diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-08-13 17:28:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-09-19 12:02:57 +0000 |
commit | f1faef7868a0f31f516889f56b69bf59cddc14d1 (patch) | |
tree | a16fb0d3dc00bb075eb9cda1e5e83c3781b3eec5 /functions.sh.in | |
parent | 2b709f7e201cc1d6d5217321d0527ba76f931eaa (diff) | |
download | abuild-f1faef7868a0f31f516889f56b69bf59cddc14d1.tar.gz abuild-f1faef7868a0f31f516889f56b69bf59cddc14d1.tar.bz2 abuild-f1faef7868a0f31f516889f56b69bf59cddc14d1.tar.xz abuild-f1faef7868a0f31f516889f56b69bf59cddc14d1.zip |
abuild: ensure a package has deps before printing them
After the first dep is printed, `shift` is called to avoid the special
case where the first dep cannot have a comma prepended. However,
if there are no deps for a package (seen early on in the aports main
repo in acf-jquery), $# is 0. POSIX specifies that `shift` has two
options when the shift operand (1) is greater than $#:
- if non-interactive, it can exit the shell
- if it does not exit the shell, it must return a non-zero exit code
Since we run the shell with -e, the second case folds in to the first.
BusyBox ash does not implement this behaviour, but bash does when called
as /bin/sh or when the `posix` shopt is set.
Diffstat (limited to 'functions.sh.in')
0 files changed, 0 insertions, 0 deletions