Skip to content

Commit

Permalink
Merge pull request #64 from ids1024/pkg
Browse files Browse the repository at this point in the history
Use system 'pkg' when run on Redox
  • Loading branch information
jackpot51 committed Aug 11, 2017
2 parents 8eba300 + c6c8776 commit fc43b45
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cook.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc43b45

Please sign in to comment.