From bf026ddaf813d0d6a8a3231e167ee1230ad8bbdb Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 2 Sep 2025 20:33:37 +0200 Subject: [PATCH] Couple more cleanups --- clean.sh | 11 +---------- config.sh | 18 +----------------- repo.sh | 15 +++------------ 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/clean.sh b/clean.sh index c1ed4cf2..45c2e14a 100755 --- a/clean.sh +++ b/clean.sh @@ -21,14 +21,5 @@ do fi echo -e "\033[01;38;5;215mcook - clean $recipe_name\033[0m" - - if [ -d "$ROOT/$recipe_path" ] - then - COOKBOOK_RECIPE="${ROOT}/$recipe_path" - TARGET_DIR="${ROOT}/$recipe_path/target/${TARGET}" - - rm -rf "${TARGET_DIR}" - else - echo "clean.sh: recipe '$recipe_name' not found" >&2 - fi + rm -rf "${ROOT}/$recipe_path/target/${TARGET}" done diff --git a/config.sh b/config.sh index f3a3b2de..71131eb8 100755 --- a/config.sh +++ b/config.sh @@ -14,7 +14,6 @@ fi # Automatic variables ROOT="$(cd `dirname "$0"` && pwd)" -REPO="$ROOT/repo/$TARGET" export PATH="${ROOT}/bin:$PATH" export AR="${HOST}-gcc-ar" @@ -43,26 +42,11 @@ export PKG_CONFIG_FOR_BUILD="pkg-config" if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "FreeBSD" ]]; then # GNU find FIND="gfind"; - - # GNU stat from Homebrew or MacPorts - if [ ! -z "$(which brew)" ]; then - STAT="$(brew --prefix)/opt/coreutils/libexec/gnubin/stat"; - elif [ ! -z "$(which port)" ]; then - # TODO: find a programatic way of asking MacPorts for it's root dir. - STAT="/opt/local/opt/coreutils/libexec/gnubin/stat"; - elif [ ! -z "$(which pkg)" ]; then - STAT="gnustat" - else - echo "Please install either Homebrew or MacPorts and run the boostrap script." - exit 1 - fi else - FIND="find" - STAT="stat"; + FIND="find"; fi export FIND -export STAT if [ ! "$(uname -s)" = "Redox" ] then diff --git a/repo.sh b/repo.sh index 8869c0e7..99ec7f27 100755 --- a/repo.sh +++ b/repo.sh @@ -36,20 +36,11 @@ fi for recipe in $recipes do - recipe_path=`target/release/find_recipe $recipe` - COOKBOOK_RECIPE="$recipe_path" - TARGET_DIR="${COOKBOOK_RECIPE}/target/${TARGET}" - COOKBOOK_BUILD="${TARGET_DIR}/build" - COOKBOOK_STAGE="${TARGET_DIR}/stage" - COOKBOOK_SOURCE="${COOKBOOK_RECIPE}/source" - COOKBOOK_SYSROOT="${TARGET_DIR}/sysroot" - target/release/cook $COOK_OPT "$recipe" done -mkdir -p "$REPO" - -declare -A APPSTREAM_SOURCES +repo="$ROOT/repo/$TARGET" +mkdir -p "$repo" # Runtime dependencies include both `[package.dependencies]` and dynamically # linked packages discovered by auto_deps. @@ -58,4 +49,4 @@ declare -A APPSTREAM_SOURCES # well. recipes="$recipes $(target/release/pkg_deps $recipes)" -target/release/repo_builder "$REPO" $recipes +target/release/repo_builder "$repo" $recipes