diff options
Diffstat (limited to 'include/err.sh')
-rwxr-xr-x | include/err.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/err.sh b/include/err.sh index 595d6c77..3699d6ce 100755 --- a/include/err.sh +++ b/include/err.sh @@ -36,23 +36,23 @@ git_err() check_project() { - read projectname < projectname || : + read -r projectname < projectname || : - [ ! -f version ] || read version < version || : + [ ! -f version ] || read -r version < version || : version_="${version}" [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \ version="git-$(git rev-parse HEAD 2>&1)" || version="${version_}" - [ ! -f versiondate ] || read versiondate < versiondate || : + [ ! -f versiondate ] || read -r versiondate < versiondate || : versiondate_="${versiondate}" [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \ --pretty='%ct' HEAD)" || versiondate="${versiondate_}" - [ ! -z ${versiondate} ] || fail "Unknown version date" || \ + [ -n "${versiondate}" ] || fail "Unknown version date" || \ err "Unknown version date" - [ ! -z ${version} ] || fail "Unknown version" || \ + [ -n "${version}" ] || fail "Unknown version" || \ err "Unknown version" - [ ! -z ${projectname} ] || fail "Unknown project" || \ + [ -n "${projectname}" ] || fail "Unknown project" || \ err "Unknown project" xx_ printf "%s\n" "${version}" > version || \ |