mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-04-11 03:32:04 +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
|
shift
|
||||||
|
|
||||||
repo_args="--repository $(shell_escape "$REPODEST/$repo")"
|
repo_args="--repository $(shell_escape "$REPODEST/$repo")"
|
||||||
[ -s "$repo_template" ] && repo_args=$(while read r; do
|
[ -s "$repo_template" ] && while read r; do
|
||||||
printf %s\\n "--repository $(shell_escape "$REPODEST/${r##*/}")"
|
repo_args="$repo_args --repository $(shell_escape "$REPODEST/${r##*/}")"
|
||||||
done) < "$repo_template"
|
done < "$repo_template"
|
||||||
|
|
||||||
eval "$SUDO_APK" add "$apk_opt_wait" "$repo_args" \
|
eval "$SUDO_APK" add "$apk_opt_wait" "$repo_args" \
|
||||||
--virtual .${prefix}depends-$pkgname "\$@" || return
|
--virtual .${prefix}depends-$pkgname "\$@" || return
|
||||||
|
Loading…
Reference in New Issue
Block a user