aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/usrp3/utils
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-12-23 10:59:07 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-01-05 17:35:14 -0800
commite92913f81a8a44def64dfcb7c0001d9ca7d2d2c4 (patch)
tree12d441822342db2e9e11b5cbe7c0fd156f0cba13 /firmware/usrp3/utils
parentf45b4eb386a4c4cf5e7a463936fb4591d1bf8854 (diff)
downloaduhd-e92913f81a8a44def64dfcb7c0001d9ca7d2d2c4.tar.gz
uhd-e92913f81a8a44def64dfcb7c0001d9ca7d2d2c4.tar.bz2
uhd-e92913f81a8a44def64dfcb7c0001d9ca7d2d2c4.zip
n230: Initial checkin of firmware files
Diffstat (limited to 'firmware/usrp3/utils')
-rwxr-xr-xfirmware/usrp3/utils/git-hash.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/usrp3/utils/git-hash.sh b/firmware/usrp3/utils/git-hash.sh
new file mode 100755
index 000000000..ff7ae5ecb
--- /dev/null
+++ b/firmware/usrp3/utils/git-hash.sh
@@ -0,0 +1,14 @@
+#!/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^^} \ No newline at end of file