Skip to content
Snippets Groups Projects
Commit 1d9568b6 authored by Sertonix's avatar Sertonix
Browse files

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.
parent 9c4abc56
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment