summaryrefslogtreecommitdiff
path: root/checkversion
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-04 08:06:10 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-04 08:06:10 +0100
commitfbd464b4f795b82990edad4901f6812b10ca3260 (patch)
tree6c39e3222dbdd67875720d84900cbc1348c2e42b /checkversion
parente638c3e41135292a7398e4c85a2dfd037be70ce3 (diff)
include/err.sh: checkgit,checkversion
call these as functions, instead of executing scripts Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'checkversion')
-rwxr-xr-xcheckversion34
1 files changed, 0 insertions, 34 deletions
diff --git a/checkversion b/checkversion
deleted file mode 100755
index b7193fc9..00000000
--- a/checkversion
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env sh
-# SPDX-License-Identifier: GPL-3.0-or-later
-# SPDX-FileCopyrightText: 2021 Leah Rowe <leah@libreboot.org>
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u
-
-. "include/err.sh"
-
-read project < projectname
-
-version="version-unknown"
-[ -f version ] && read version < version
-version_="${version}"
-if [ -e ".git" ]; then
- version="$(git describe --tags HEAD 2>&1)" || \
- version="git-$(git rev-parse HEAD 2>&1)" || \
- version="${version_}"
- printf "%s\n" "${version}" > version
-fi
-
-versiondate="version-date-unknown"
-[ -f versiondate ] && read versiondate < versiondate
-versiondate_="${versiondate}"
-if [ -e ".git" ]; then
- versiondate="$(git show --no-patch --no-notes --pretty='%ct' HEAD)" || \
- versiondate="${versiondate_}"
- printf "%s\n" "${versiondate}" > versiondate
-fi
-
-if [ "${versiondate}" = "version-date-unknown" ] || \
- [ "${version}" = "version-unknown" ]; then
- err "cannot determine ${projectname} revision"
-fi