2016-04-30 02:46:46 -07:00
|
|
|
#!/bin/bash
|
2017-01-12 07:42:57 -08:00
|
|
|
case $1 in
|
|
|
|
"install")
|
|
|
|
SCRIPT_DIRECTORY=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
|
|
echo -n "bash util/git_hook_pre_commit.bash execute" > $SCRIPT_DIRECTORY/../.git/hooks/pre-commit
|
|
|
|
chmod +x $SCRIPT_DIRECTORY/../.git/hooks/pre-commit
|
|
|
|
chmod +x $SCRIPT_DIRECTORY/git_hook_pre_commit.bash
|
|
|
|
;;
|
|
|
|
"execute")
|
2019-08-24 08:03:45 -07:00
|
|
|
git add -u
|
2017-01-12 07:42:57 -08:00
|
|
|
source util/increment_version.bash
|
|
|
|
VERSION=`cat VERSION`
|
|
|
|
VERSION=`increment_version $VERSION`
|
|
|
|
echo -n $VERSION > VERSION
|
2018-01-02 07:11:28 -08:00
|
|
|
convert -background none -density 196 -fill black -pointsize 21 -resample 72 -unsharp 0x.5 label:"$(cat VERSION)" -trim +repage -bordercolor white -border 3 util/version.png
|
2017-01-12 07:42:57 -08:00
|
|
|
git add VERSION
|
2018-01-02 07:11:28 -08:00
|
|
|
git add util/version.png
|
2017-01-12 07:42:57 -08:00
|
|
|
;;
|
|
|
|
esac
|