From dc49b7db3714aef12319afb5faffbbfad48640d3 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Sat, 8 Jun 2019 19:27:49 -0400 Subject: [PATCH] add script for creating local branches --- patches/branch.sh | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100755 patches/branch.sh 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<