From 8da2559b35d576ad13806e61a590ad3a8de26cda Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 25 May 2024 14:37:40 +0100 Subject: 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 --- include/option.sh | 4 ++-- 1 file 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 || : -- cgit v1.2.1