summaryrefslogtreecommitdiff
path: root/include/option.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-25 14:37:40 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-25 14:37:40 +0100
commit8da2559b35d576ad13806e61a590ad3a8de26cda (patch)
treefdd1a2bc6893a1779e5ae6f974840a8789a289fb /include/option.sh
parentd32968c7310068252fe23c87b2c4b33c09f0a00e (diff)
option.sh: fix bad check for version/versiondate
i was checking whether it's a directory, whereas i should have been checking whether it's a file. this is a workaround put in place in case someone downloaded a tarball from codeberg which is pre-generated per commit. in this situation, the version and versiondate files do not exist, but the design of the build system requires that they do exist. the existing check is correct except for this bug, so fix the bug. check that they are files, not directories Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/option.sh')
-rwxr-xr-xinclude/option.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/option.sh b/include/option.sh
index 3648ecd2..6ab27354 100755
--- a/include/option.sh
+++ b/include/option.sh
@@ -66,9 +66,9 @@ x_() {
[ $# -lt 1 ] || ${@} || $err "Unhandled non-zero exit: $@"; return 0
}
-[ -e ".git" ] || [ -d "version" ] || printf "unknown\n" > version || \
+[ -e ".git" ] || [ -f "version" ] || printf "unknown\n" > version || \
$err "Cannot generate unknown version file"
-[ -e ".git" ] || [ -d "versiondate" ] || printf "1716415872\n" > versiondate || \
+[ -e ".git" ] || [ -f "versiondate" ] || printf "1716415872\n" > versiondate || \
$err "Cannot generate unknown versiondate file"
read -r projectname < projectname || :