1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 19:12:11 +01:00
falkonOfficial/scripts/getrevision.sh

22 lines
304 B
Bash
Raw Normal View History

#!/bin/bash
REV=""
if [ -e "/usr/bin/git" ] && ([ -e ".git" ] || [ -e "../.git" ]); then
REV=`git rev-parse HEAD`
elif [ -e "git_revision" ]; then
REV=`cat git_revision`
fi
case $1 in
long)
echo $REV
;;
short|*)
echo $REV | cut -c 1-10
;;
esac
2013-01-21 22:38:31 +01:00
exit 0