Changeset View
Changeset View
Standalone View
Standalone View
roles/devserver/userland-home/files/dereckson/bin/git-respawn
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/usr/bin/env bash | |||||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |||||
if [ "$BRANCH" = "master" ]; then | |||||
echo "You're already on the master branch." | |||||
exit 1 | |||||
fi | |||||
# Updates master branch if there isn't any staged change and working tree is clean | |||||
git checkout master | |||||
git diff-index --quiet --cached HEAD -- && git diff-files --quiet && git pull | |||||
git branch -D "$BRANCH" | |||||
# Fetch new branch | |||||
if [ ${BRANCH:0:10} = "arcpatch-D" ]; then | |||||
arc patch ${BRANCH:9} | |||||
fi |
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator