mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
ed74c773b3
- it can now show long/short revision number
22 lines
333 B
Bash
Executable File
22 lines
333 B
Bash
Executable File
#!/bin/bash
|
|
|
|
REV=""
|
|
|
|
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
|
|
REV=`cat git_revision`
|
|
fi
|
|
|
|
case $1 in
|
|
long)
|
|
echo $REV
|
|
;;
|
|
|
|
short|*)
|
|
echo $REV | cut -c 1-10
|
|
;;
|
|
esac
|
|
|
|
exit;
|