mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-25 04:18:37 +00:00
abuild: fix eval argument splitting and simplify
A newline starts a new command in shell scripts and eval uses the shell grammar. Use a space instead to fix multiline repo templates. Also avoid one subshell.
This commit is contained in:
parent
9c4abc561e
commit
1d9568b669
@ -2366,9 +2366,9 @@ apk_add_makedeps() {
|
||||
shift
|
||||
|
||||
repo_args="--repository $(shell_escape "$REPODEST/$repo")"
|
||||
[ -s "$repo_template" ] && repo_args=$(while read r; do
|
||||
printf %s\\n "--repository $(shell_escape "$REPODEST/${r##*/}")"
|
||||
done) < "$repo_template"
|
||||
[ -s "$repo_template" ] && while read r; do
|
||||
repo_args="$repo_args --repository $(shell_escape "$REPODEST/${r##*/}")"
|
||||
done < "$repo_template"
|
||||
|
||||
eval "$SUDO_APK" add "$apk_opt_wait" "$repo_args" \
|
||||
--virtual .${prefix}depends-$pkgname "\$@" || return
|
||||
|
Loading…
Reference in New Issue
Block a user