From 2c8570c07af03df67d90d7565f6bc3540c722995 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 26 Apr 2025 19:28:49 +0100 Subject: [PATCH] move variables out of init.sh to others move them where they are used, or if they are used in many places, move them to lib.sh Signed-off-by: Leah Rowe --- include/init.sh | 6 ------ include/inject.sh | 1 + include/lib.sh | 5 +++++ include/rom.sh | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/init.sh b/include/init.sh index 149fc27..ce1e043 100644 --- a/include/init.sh +++ b/include/init.sh @@ -14,12 +14,6 @@ projectsite="https://canoeboot.org/" export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" xbmkpath="$PATH" -_ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" - -ifdtool="elf/ifdtool/default/ifdtool" -cbfstool="elf/cbfstool/default/cbfstool" -rmodtool="elf/cbfstool/default/rmodtool" -grubdata="config/data/grub" err="err_" setvars() diff --git a/include/inject.sh b/include/inject.sh index 4978b10..a5a93dc 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -9,6 +9,7 @@ hashfiles="vendorhashes blobhashes" # used to detect and error out dontflash="!!! AN ERROR OCCURED! Do NOT flash these images !!!" tmpromdel="$xbmkpwd/tmp/DO_NOT_FLASH" nvm="util/nvmutil/nvm" +ifdtool="elf/ifdtool/default/ifdtool" cv="CONFIG_GBE_BIN_PATH CONFIG_IFD_BIN_PATH" diff --git a/include/lib.sh b/include/lib.sh index 740edcf..01a7849 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -4,6 +4,11 @@ # Copyright (c) 2020-2025 Leah Rowe # Copyright (c) 2025 Alper Nebi Yasak +_ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" + +cbfstool="elf/cbfstool/default/cbfstool" +rmodtool="elf/cbfstool/default/rmodtool" + remkdir() { rm -Rf "$1" || $err "remkdir: !rm -Rf \"$1\"" diff --git a/include/rom.sh b/include/rom.sh index 407e3d4..7b1de1b 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -5,6 +5,8 @@ # Copyright (c) 2022-2023 Alper Nebi Yasak # Copyright (c) 2023-2024 Riku Viitanen +grubdata="config/data/grub" + mkserprog() { [ $# -lt 1 ] && $err "mkserprog: no arguments provided"