From 37ec3169cb77e5d4a99db73d3b59b9078e5f4533 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Mon, 31 Oct 2016 14:08:05 -0600 Subject: [PATCH] Use pushd/popd to fix multiple commands --- cook.sh | 15 ++++++++++----- recipes/acid/recipe.sh | 1 + recipes/ion/recipe.sh | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 recipes/acid/recipe.sh create mode 100644 recipes/ion/recipe.sh diff --git a/cook.sh b/cook.sh index 8810e6779..6e4cb2175 100755 --- a/cook.sh +++ b/cook.sh @@ -17,12 +17,14 @@ then do case "$arg" in build) - cd build + pushd build > /dev/null xargo build --target "$TARGET" $CARGOFLAGS + popd > /dev/null ;; clean) - cd build + pushd build > /dev/null xargo clean + popd > /dev/null ;; fetch) git clone --recursive "$GIT" build @@ -32,23 +34,26 @@ then ;; stage) mkdir -p stage/bin - cd build + pushd build > /dev/null #TODO xargo install --root "../stage" $CARGOFLAGS cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin + popd > /dev/null ;; unstage) rm -rf stage ;; tar) - cd stage + pushd stage > /dev/null tar cf ../stage.tar . + popd > /dev/null ;; untar) rm -rf stage.tar ;; update) - cd build + pushd build > /dev/null xargo update + popd > /dev/null ;; *) echo "$0 {package} {build|clean|fetch|update}" diff --git a/recipes/acid/recipe.sh b/recipes/acid/recipe.sh new file mode 100644 index 000000000..a78455758 --- /dev/null +++ b/recipes/acid/recipe.sh @@ -0,0 +1 @@ +GIT=https://github.com/redox-os/acid.git diff --git a/recipes/ion/recipe.sh b/recipes/ion/recipe.sh new file mode 100644 index 000000000..f7e3e66e9 --- /dev/null +++ b/recipes/ion/recipe.sh @@ -0,0 +1 @@ +GIT=https://github.com/redox-os/ion.git -- GitLab