diff --git a/patches/branch.sh b/patches/branch.sh new file mode 100755 index 0000000..569cfff --- /dev/null +++ b/patches/branch.sh @@ -0,0 +1,94 @@ +#!/bin/bash +master=~/minetest/games/Bucket_Game +branches=~/git/1.pull-requests/Bucket_Game-branches +if [ ! -d "$branches" ]; then + mkdir -p "$branches" || customDie "Failed to mkdir -p '$branches'" + echo "Created '$branches'" +fi + +customDie() { + errcode=1 + echo + echo "ERROR:" + echo "$1" + echo + echo + if [ ! -z "$2" ]; then errcode=$2; fi + exit $errcode +} + +usage() { + cat<