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>audit2-merge1
parent
3554593fd8
commit
84ee6a1ed8
|
@ -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 || :
|
||||
|
|
Loading…
Reference in New Issue