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

change version to git revision when installing

This commit is contained in:
Johnny Kuan 2011-09-15 23:21:35 -07:00
parent f438372616
commit 12bf584088
3 changed files with 17 additions and 0 deletions

11
git-version.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# add git revision to autojump
gitrevision=`git rev-parse HEAD`
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

View File

@ -40,6 +40,9 @@ done
echo "Installing to ${prefix} ..."
# add git revision to autojump
./git-revision.sh
# INSTALL AUTOJUMP
sudo mkdir -p ${prefix}/share/autojump/
sudo mkdir -p ${prefix}/bin/

View File

@ -39,6 +39,9 @@ done
echo "Installing main files to ${prefix} ..."
# add git revision to autojump
./git-revision.sh
sudo mkdir -p ${prefix}/share/autojump/
sudo mkdir -p ${prefix}/bin/
sudo mkdir -p ${prefix}/share/man/man1/