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:
parent
f438372616
commit
12bf584088
11
git-version.sh
Executable file
11
git-version.sh
Executable 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
|
||||
|
||||
|
@ -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/
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user