Add staging command

This commit is contained in:
Jeremy Soller 2016-10-31 13:56:47 -06:00
parent a8c48d184c
commit c3fb764940
4 changed files with 14 additions and 15 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
build
stage

28
cook.sh
View File

@ -11,45 +11,43 @@ if [ -n "$1" ]
then
if [ -d "recipes/$1" ]
then
pushd "recipes/$1"
cd "recipes/$1"
source recipe.sh
for arg in "${@:2}"
do
case "$arg" in
build)
pushd build
cd build
xargo build --target "$TARGET" $CARGOFLAGS
popd
;;
clean)
pushd build
cd build
xargo clean
popd
;;
install)
mkdir -p root/bin
pushd build
#TODO xargo install --root "../root" $CARGOFLAGS
cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../root/bin
popd
;;
fetch)
git clone --recursive "$GIT" build
;;
stage)
mkdir -p stage/bin
cd build
#TODO xargo install --root "../stage" $CARGOFLAGS
cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin
;;
unstage)
rm -rf stage
;;
unfetch)
rm -rf build
;;
update)
pushd build
cd build
xargo update
popd
;;
*)
echo "$0 {package} {build|clean|fetch|update}"
;;
esac
done
popd
else
echo "$0: recipe '$1' not found"
fi

Binary file not shown.