diff --git a/clean.sh b/clean.sh index 211fcb7cb..efde8b91f 100755 --- a/clean.sh +++ b/clean.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -source config.sh +source `dirname "$0"`/config.sh if [ $# = 0 ] then diff --git a/config.sh b/config.sh index f60c503e8..8e9801985 100755 --- a/config.sh +++ b/config.sh @@ -17,8 +17,11 @@ if [ x"${HOST}" == x"riscv64gc-unknown-redox" ] ; then HOST="riscv64-unknown-redox" fi +# Cookbook requires correct CWD to work +cd `dirname "$0"` + # Automatic variables -ROOT="$(cd `dirname "$0"` && pwd)" +ROOT=`pwd` export AR="${HOST}-gcc-ar" export AS="${HOST}-as" diff --git a/fetch.sh b/fetch.sh index 16e503fd8..cd9acc9cb 100755 --- a/fetch.sh +++ b/fetch.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e -source config.sh +source `dirname "$0"`/config.sh +# Intentionally empty to allow fetch and cook running in parallel diff --git a/repo.sh b/repo.sh index 3ef74d17a..acfffb472 100755 --- a/repo.sh +++ b/repo.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash set -e -shopt -s nullglob -source config.sh +source `dirname "$0"`/config.sh APPSTREAM="0" COOK_OPT="" @@ -17,7 +16,7 @@ do COOK_OPT+=" --with-package-deps" elif [ "$arg" == "--nonstop" ] then - COOK_OPT+=" --nonstop" + export COOKBOOK_OFFLINE=true else recipes+=" $arg" fi @@ -25,7 +24,4 @@ done repo cook $COOK_OPT $recipes -repo="$ROOT/repo/$TARGET" -mkdir -p "$repo" - repo_builder "$repo" $recipes diff --git a/unfetch.sh b/unfetch.sh index 059349367..4b7b62626 100755 --- a/unfetch.sh +++ b/unfetch.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -source config.sh +source `dirname "$0"`/config.sh if [ $# = 0 ] then