diff options
author | Leah Rowe <leah@libreboot.org> | 2024-05-19 06:51:20 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-05-19 06:51:20 +0100 |
commit | 71baf65351ff93ef3d6177ae274d7c1d62727035 (patch) | |
tree | 9f7c1d645b5d1c8959998e45a66137877e15a30b | |
parent | 1fe9c4b8991f3bff7532fd85f4fd9ece73044236 (diff) |
option.sh: don't return 1 in mkrom_tarball
one of the calling functions relies on the return value
to be always 0, so these error conditions in mkrom_tarball
have been altered to cause an *exit* (non-zero) instead.
in practise, the commands in question were printf commands
run after tho directory they output to had been created,
so write access would probably not be an issue.
nonetheless, technically correct is the best kind of correct.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | include/option.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/option.sh b/include/option.sh index 8e50a932..bfeb9eb3 100755 --- a/include/option.sh +++ b/include/option.sh @@ -153,9 +153,9 @@ git_err() mkrom_tarball() { - printf "%s\n" "${version}" > "${1}/version" || return 1 - printf "%s\n" "${versiondate}" > "${1}/versiondate" || return 1 - printf "%s\n" "${projectname}" > "${1}/projectname" || return 1 + printf "%s\n" "${version}" > "${1}/version" || $err "$1 !version" + printf "%s\n" "${versiondate}" > "${1}/versiondate" || $err "$1 !vdate" + printf "%s\n" "${projectname}" > "${1}/projectname" || $err "$1 !pname" mktarball "$1" "${1%/*}/${relname}_${1##*/}.tar.xz" x_ rm -Rf "$1" |