summaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-03-06 17:07:33 +0000
committerGogs <gogitservice@gmail.com>2022-03-06 17:07:33 +0000
commit89aac5393aaccf7104a41e730456f6e56b35a703 (patch)
tree563bd8321f6c326705d82bb128dc57a6876ed132 /resources/scripts
parentfd41399961d81cfda997cb580957650b6ea5e9c3 (diff)
parentacc57bda6df2a9c480ed27549bea0bfc575fe9d2 (diff)
Merge branch 'submodule-version' of xloem/lbmk into master
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/misc/versioncheck4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/scripts/misc/versioncheck b/resources/scripts/misc/versioncheck
index 6c887326..e9eea929 100755
--- a/resources/scripts/misc/versioncheck
+++ b/resources/scripts/misc/versioncheck
@@ -24,7 +24,7 @@ if [ -f version ]; then
version="$(cat version)"
fi
version_="${version}"
-if [ -d ".git/" ]; then
+if [ -e ".git" ]; then
version="$(git describe --tags HEAD 2>&1)" \
|| version="git-$(git rev-parse HEAD 2>&1)" \
|| version="${version_}"
@@ -36,7 +36,7 @@ if [ -f versiondate ]; then
versiondate="$(cat versiondate)"
fi
versiondate_="${versiondate}"
-if [ -d ".git/" ]; then
+if [ -e ".git" ]; then
versiondate="$(git show --no-patch --no-notes --pretty='%ct' HEAD)" \
|| versiondate="${versiondate_}"
printf "%s\n" "${versiondate}" > versiondate