mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-16 21:10:10 +00:00
14 lines
No EOL
305 B
Bash
Executable file
14 lines
No EOL
305 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ $(command -v git) = "" ]]; then
|
|
short_hash="FFFFFFFF"
|
|
else
|
|
if (git diff --quiet); then
|
|
#Clean
|
|
short_hash="0$(git rev-parse --verify HEAD --short)"
|
|
else
|
|
#Dirty
|
|
short_hash="F$(git rev-parse --verify HEAD --short)"
|
|
fi
|
|
fi
|
|
echo ${short_hash^^} |