diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 15:23:29 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 15:23:29 +0100 |
commit | 8659b9d77c0a823f18a08fcea53a62dc29188529 (patch) | |
tree | dcb72079d1e24a2a0d3bfc4ea399c346d47cadde /printHash.sh | |
parent | Cmake version for hash (diff) | |
download | re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar.gz re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar.bz2 re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar.lz re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar.xz re3-8659b9d77c0a823f18a08fcea53a62dc29188529.tar.zst re3-8659b9d77c0a823f18a08fcea53a62dc29188529.zip |
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--] | printHash.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/printHash.sh b/printHash.sh index 7b4453a1..71f54466 100644..100755 --- a/printHash.sh +++ b/printHash.sh @@ -1,12 +1,10 @@ -#!/usr/bin/bash +#!/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 +if (command -v "git" >/dev/null) then git rev-parse --short HEAD | tr -d '\n' >> $1 fi |