mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
lib.sh: condense setcfg() if/else logic
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-6
@@ -49,12 +49,9 @@ chkvars projectname projectsite
|
||||
|
||||
setcfg()
|
||||
{
|
||||
if [ $# -gt 1 ]; then
|
||||
printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
|
||||
else
|
||||
printf "e \"%s\" f missing && %s \"Missing config\";\n" "$1" \
|
||||
"$err"
|
||||
fi
|
||||
[ $# -gt 1 ] && printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
|
||||
[ $# -gt 1 ] || \
|
||||
printf "e \"%s\" f not && %s \"Missing config\";\n" "$1" "$err"
|
||||
printf ". \"%s\" || %s \"Could not read config\";\n" "$1" "$err"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user