summaryrefslogtreecommitdiffstats
path: root/printHash.sh
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-11 23:49:09 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-12 03:28:08 +0100
commit9e1c048e206d4e91d03ef8978bf61a6af654fc3b (patch)
tree1dac0da5ad8bddee9197139937b8f284c8cfac05 /printHash.sh
parentbetter controller menu txds (diff)
downloadre3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.gz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.bz2
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.lz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.xz
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.tar.zst
re3-9e1c048e206d4e91d03ef8978bf61a6af654fc3b.zip
Diffstat (limited to 'printHash.sh')
-rw-r--r--printHash.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/printHash.sh b/printHash.sh
new file mode 100644
index 00000000..7b4453a1
--- /dev/null
+++ b/printHash.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/bash
+
+> $1
+
+echo -n "#define GIT_SHA1 \"" > $1
+
+git --version 2>&1 >/dev/null
+GIT_IS_AVAILABLE=$?
+if [ $GIT_IS_AVAILABLE -ne 0 ]; then
+git rev-parse --short HEAD | tr -d '\n' >> $1
+fi
+
+echo "\"" >> $1
+echo "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1 \ No newline at end of file