1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00
wting_autojump/git-version.sh

10 lines
356 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# add git revision to autojump
2011-09-22 09:06:08 +00:00
gitrevision=`git describe`
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
gitrevision=$gitrevision"-dirty"
fi
sed -e "s/^AUTOJUMP_VERSION = \".*\"$/AUTOJUMP_VERSION = \"git revision $gitrevision\"/" autojump > autojump-version
mv -f autojump-version autojump
chmod a+rw autojump