Skip to content

Instantly share code, notes, and snippets.

@shiwano
Last active August 29, 2015 13:57
Show Gist options
  • Save shiwano/9855692 to your computer and use it in GitHub Desktop.
Save shiwano/9855692 to your computer and use it in GitHub Desktop.
commit-msg hook for misakura
#!/bin/sh
if type misakura > /dev/null 2>&1; then
if ! cat $1 | grep '^Before translating into Misakura language:' > /dev/null 2>&1; then
mv $1 $1.$$
misakurized=`cat $1.$$ | misakura`
printf "${misakurized}\n\nBefore translating into Misakura language:\n`sed -e 's/^/\t/g' $1.$$`" > "$1"
rm -f $1.$$
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment