Couple more cleanups

This commit is contained in:
bjorn3 2025-09-02 20:33:37 +02:00
parent 24eccf7093
commit bf026ddaf8
3 changed files with 5 additions and 39 deletions

View File

@ -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

View File

@ -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

15
repo.sh
View File

@ -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