From c6c877611d107998d47aaaf9cd3bbd6989b7c3b2 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott <ian@iandouglasscott.com> Date: Thu, 10 Aug 2017 18:30:46 -0700 Subject: [PATCH] Use system 'pkg' when run on Redox --- cook.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cook.sh b/cook.sh index 392e1da65..90f6d02e5 100755 --- a/cook.sh +++ b/cook.sh @@ -8,6 +8,13 @@ source config.sh export BINDIR=bin export CARGOFLAGS= +if [ ! "$(uname -s)" = "Redox" ] +then +function pkg { + CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- $@ +} +fi + function usage { echo "cook.sh $1 <op>" >&2 echo " dist" >&2 @@ -118,7 +125,7 @@ function op { for i in "${BUILD_DEPENDS[@]}" do - CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- --target=$TARGET install --root sysroot "$REPO/$i.tar.gz" + pkg --target=$TARGET install --root sysroot "$REPO/$i.tar.gz" done fi @@ -229,7 +236,7 @@ function op { echo "target = \"$TARGET\"" >> "stage.toml" mkdir -p stage/pkg cp -v stage.toml "stage/pkg/$1.toml" - CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- --target=$TARGET create stage + pkg --target=$TARGET create stage ;; untar) rm -rfv stage.tar.gz stage.sig stage.toml -- GitLab