mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
c0026af63e
* Use `rev-parse` instead of `show-ref` * Dev builds currently use masters commit ref and makes it difficult to determine which version is really installed with About → Help. Use the current HEAD when generating the `Makefile`s for `DGIT_REVISION` **NOTES** * The bash scripts are somewhat duplicated with the unused `--short` parameter but omitted at this time in case a long hash is wanted. * `make distclean` is still needed since those defines are hard-coded into those affected `Makefile`s * Keep current abstract as per @nowrep * Remove some known unneeded bash pipes
22 lines
304 B
Bash
Executable File
22 lines
304 B
Bash
Executable File
#!/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
|
|
|
|
exit 0
|