Skip to content
Snippets Groups Projects
Commit 37ec3169 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Use pushd/popd to fix multiple commands

parent 4ab71758
No related branches found
No related tags found
No related merge requests found
...@@ -17,12 +17,14 @@ then ...@@ -17,12 +17,14 @@ then
do do
case "$arg" in case "$arg" in
build) build)
cd build pushd build > /dev/null
xargo build --target "$TARGET" $CARGOFLAGS xargo build --target "$TARGET" $CARGOFLAGS
popd > /dev/null
;; ;;
clean) clean)
cd build pushd build > /dev/null
xargo clean xargo clean
popd > /dev/null
;; ;;
fetch) fetch)
git clone --recursive "$GIT" build git clone --recursive "$GIT" build
...@@ -32,23 +34,26 @@ then ...@@ -32,23 +34,26 @@ then
;; ;;
stage) stage)
mkdir -p stage/bin mkdir -p stage/bin
cd build pushd build > /dev/null
#TODO xargo install --root "../stage" $CARGOFLAGS #TODO xargo install --root "../stage" $CARGOFLAGS
cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin
popd > /dev/null
;; ;;
unstage) unstage)
rm -rf stage rm -rf stage
;; ;;
tar) tar)
cd stage pushd stage > /dev/null
tar cf ../stage.tar . tar cf ../stage.tar .
popd > /dev/null
;; ;;
untar) untar)
rm -rf stage.tar rm -rf stage.tar
;; ;;
update) update)
cd build pushd build > /dev/null
xargo update xargo update
popd > /dev/null
;; ;;
*) *)
echo "$0 {package} {build|clean|fetch|update}" echo "$0 {package} {build|clean|fetch|update}"
......
GIT=https://github.com/redox-os/acid.git
GIT=https://github.com/redox-os/ion.git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment