Skip to content

Instantly share code, notes, and snippets.

@aalemayhu
Created April 29, 2015 03:17
Show Gist options
  • Save aalemayhu/4ec1318c4e58f973a13d to your computer and use it in GitHub Desktop.
Save aalemayhu/4ec1318c4e58f973a13d to your computer and use it in GitHub Desktop.
ease committing translation changes
#!/bin/sh
# FROM http://stackoverflow.com/questions/307503/whats-the-best-way-to-check-that-environment-variables-are-set-in-unix-shellscr
[ -z "$LINGUA" ] && echo "Need to set LINGUA" && exit 1;
[ -z "$MANUAL" ] && echo "Need to set MANUAL" && exit 1;
git add -u .
commit_msg=`tempfile`
echo "($LINGUA) Use latest reviewed $MANUAL manual translation" > $commit_msg
echo >> $commit_msg
echo "o Fetch changes from transifex." >> $commit_msg
echo "o Update changelog to mention last changes." >> $commit_msg
git commit -m "`cat $commit_msg`"
rm $commit_msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment