diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-11-15 16:55:27 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-11-15 16:55:27 +0000 |
| commit | 7ef7e02f7325026c15c34fe8114d7d465e206a41 (patch) | |
| tree | b35e72a057ebad30e6e1c66bbef35dcdc62a92a9 /include | |
| parent | 214ed3efd25cc456f6d6120783b01abc2f3dcd5b (diff) | |
lib.sh: reduce indentation in setvars
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/lib.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/lib.sh b/include/lib.sh index feb411e0..812341f4 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -85,19 +85,16 @@ setvars() _setvars="" if [ $# -lt 2 ]; then - return 0 - else - val="$1" - - shift 1 + fi - while [ $# -gt 0 ]; do - printf "%s=\"%s\"\n" "$1" "$val" + val="$1" + shift 1 - shift 1 - done - fi + while [ $# -gt 0 ]; do + printf "%s=\"%s\"\n" "$1" "$val" + shift 1 + done } # return 0 if project is single-tree, otherwise 1 |
