Skip to content

Instantly share code, notes, and snippets.

@oiljin
Created May 25, 2016 03:43
Show Gist options
  • Save oiljin/60aab45c2fae7c87ad15ec272267cd79 to your computer and use it in GitHub Desktop.
Save oiljin/60aab45c2fae7c87ad15ec272267cd79 to your computer and use it in GitHub Desktop.
#!/bin/sh
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2>/dev/null);
if [ -n $BRANCH_NAME ] && [ $BRANCH_NAME != 'master' ];
then
echo "$(tr [:lower:] [:upper:] <<< [$BRANCH_NAME]) $(< $1)" > $1;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment