mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 04:36:34 +01:00
Updated getrevision.sh script
- it can now show long/short revision number
This commit is contained in:
parent
0c4b8e164e
commit
ed74c773b3
@ -1,10 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 1-10
|
|
||||||
|
|
||||||
if [ -e "/usr/bin/git" ] && [ -e ".git" ]; then
|
REV=""
|
||||||
git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 1-10;
|
|
||||||
|
if [ -e "/usr/bin/git" ] && ([ -e ".git" ] || [ -e "../.git" ]); then
|
||||||
|
REV=`git show-ref refs/heads/master | cut -d " " -f 1`
|
||||||
elif [ -e "git_revision" ]; then
|
elif [ -e "git_revision" ]; then
|
||||||
cat git_revision | cut -c 1-10;
|
REV=`cat git_revision`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
long)
|
||||||
|
echo $REV
|
||||||
|
;;
|
||||||
|
|
||||||
|
short|*)
|
||||||
|
echo $REV | cut -c 1-10
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user