Fix shell quoting.

This commit is contained in:
WillyPillow 2020-07-04 01:11:53 +08:00
parent 1d65c5ee01
commit e91f2eb6f4
No known key found for this signature in database
GPG Key ID: 3839E194B1415A9C

View File

@ -28,12 +28,10 @@ OPTS+=("--quiet")
RET=0
if [ "$1" = "query" ]; then
# shellcheck disable=SC2068
dnf repoquery ${OPTS[@]} --qf='%{name}:%{epoch}:%{version}:%{release}:%{reponame}:%{downloadsize}:%{summary}' "$SPEC"
dnf repoquery "${OPTS[@]}" --qf='%{name}:%{epoch}:%{version}:%{release}:%{reponame}:%{downloadsize}:%{summary}' "$SPEC"
RET="$?"
elif [ "$1" = "download" ]; then
# shellcheck disable=SC2068
curl -L "$(dnf download ${OPTS[@]} --url "$SPEC" | shuf -n 1)" -o -
curl -L "$(dnf download "${OPTS[@]}" --url "$SPEC" | shuf -n 1)" -o -
RET="$?"
fi