diff --git a/cook.sh b/cook.sh index f47f585499cdaf6df14bab1553bc1e09d2eea850..875e78cb746847beb26e1f508bde17fcd2183b42 100755 --- a/cook.sh +++ b/cook.sh @@ -42,11 +42,23 @@ function op { popd > /dev/null ;; stage) - mkdir -p stage/bin + mkdir -p stage pushd build > /dev/null + if [ "$(type -t recipe_stage)" = "function" ] + then + recipe_stage ../stage + fi #TODO xargo install --root "../stage" $CARGOFLAGS - cp -v $(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name "*.*") ../stage/bin - strip -v ../stage/bin/* + bins="$(find target/x86_64-unknown-redox/debug/ -maxdepth 1 -type f ! -name '*.*')" + if [ -n "$bins" ] + then + mkdir -p ../stage/bin + for bin in $bins + do + cp -v "$bin" "../stage/bin/$(basename $bin)" + strip -v "../stage/bin/$(basename $bin)" + done + fi popd > /dev/null ;; unstage) diff --git a/recipes/pixelcannon/recipe.sh b/recipes/pixelcannon/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..b4cc7bed21586ad9dfbef10ce955d319a532039b --- /dev/null +++ b/recipes/pixelcannon/recipe.sh @@ -0,0 +1,6 @@ +GIT=https://github.com/jackpot51/pixelcannon.git + +function recipe_stage { + mkdir -pv "$1/apps/pixelcannon" + cp -Rv assets "$1/apps/pixelcannon" +}