Newer
Older

Jeremy Soller
committed
#!/bin/bash
TARGET=x86_64-unknown-redox
set -e
if [ -n "$1" ]
then
if [ -d "recipes/$1" ]
then
fetch)
git clone --recursive "$GIT" build
;;
unfetch)
rm -rf build
;;
pull)
pushd build > /dev/null
git pull
git submodule sync
git submodule update --init --recursive
popd > /dev/null
;;
update)
pushd build > /dev/null
xargo update
popd > /dev/null
;;
xargo build --target "$TARGET" $CARGOFLAGS
#TODO xargo install --root "../stage" $CARGOFLAGS
cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin
;;
*)
echo "$0 {package} {build|clean|fetch|update}"
;;
esac
done
else
echo "$0: recipe '$1' not found"
fi
else
echo "$0 {package} {build|clean|fetch|update}"
fi