From 5c2e74c425718f90667ac26abcd5fc0623497e16 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Mon, 9 Jan 2017 16:47:32 -0700 Subject: [PATCH] Support for changing binary dir, support for doing binary staging after recipe_stage function --- cook.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cook.sh b/cook.sh index cf6b555f3..e5ce05430 100755 --- a/cook.sh +++ b/cook.sh @@ -9,7 +9,8 @@ REPO="$ROOT/repo/$TARGET" export CC="$ROOT/libc-artifacts/gcc.sh" # Variables to be overriden by recipes -export CARGOFLAGS=--verbose +export BINDIR=bin +export CARGOFLAGS= set -e @@ -68,19 +69,23 @@ function op { stage) mkdir -p stage pushd build > /dev/null + skip_bins="0" if [ "$(type -t recipe_stage)" = "function" ] then recipe_stage ../stage - else + skip_bins="$?" + fi + if [ "$skip_bins" -eq "0" ] + then #TODO xargo install --root "../stage" $CARGOFLAGS bins="$(find target/$TARGET/release/ -maxdepth 1 -type f ! -name '*.*')" if [ -n "$bins" ] then - mkdir -p ../stage/bin + mkdir -p "../stage/$BINDIR" for bin in $bins do - cp -v "$bin" "../stage/bin/$(basename $bin)" - #strip -v "../stage/bin/$(basename $bin)" + cp -v "$bin" "../stage/$BINDIR/$(basename $bin)" + #strip -v "../stage/$BINDIR/$(basename $bin)" done fi fi -- GitLab