summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-07-05 00:41:09 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-07-05 00:41:09 -0400
commitf9e7982a7aa2b7d496969d9527130a8236fc82cc (patch)
treee56161ad841fbf37c583e375a716b53209163964 /src
parent9030f048138895e95e9f93d297859de600846a81 (diff)
librerelease: clean up quoting
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/librerelease18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index bf69a8b..c287e13 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -65,12 +65,12 @@ create_signature() {
local filename="$1"
msg "$(gettext "Signing package...")"
- local SIGNWITHKEY=""
+ local SIGNWITHKEY=()
if [[ -n $GPGKEY ]]; then
- SIGNWITHKEY="-u ${GPGKEY}"
+ SIGNWITHKEY=(-u "${GPGKEY}")
fi
# The signature will be generated directly in ascii-friendly format
- gpg --detach-sign --use-agent ${SIGNWITHKEY} "$filename" || ret=$?
+ gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" "$filename" || ret=$?
if (( ! ret )); then
@@ -214,8 +214,8 @@ release_packages() {
# Make the permissions of the packages 644 otherwise the user will get access
# denied error when they try to download (rsync --no-perms doesn't seem to
# work).
- find ${WORKDIR}/staging -type f -exec chmod 644 {} +
- find ${WORKDIR}/staging -type d -exec chmod 755 {} +
+ find "${WORKDIR}/staging" -type f -exec chmod 644 {} +
+ find "${WORKDIR}/staging" -type d -exec chmod 755 {} +
local file_list="$(mktemp -t ${0##*/}.XXXXXXXXXX)"
trap "$(printf 'rm -f -- %q' "$file_list")" EXIT
@@ -225,11 +225,11 @@ release_packages() {
msg "%s to upload" "$(cd "${WORKDIR}/staging" && du -hc --files0-from="$file_list" | sed -n '$s/\t.*//p')"
msg "Uploading packages..."
- xargs -0r -a "$file_list" dirname -z | ssh ${REPODEST%%:*} "$(printf 'mkdir -p -- %q && cd %q && xargs -0r mkdir -pv --' "${REPODEST#*:}" "${REPODEST#*:}")"
+ xargs -0r -a "$file_list" dirname -z | ssh "${REPODEST%%:*}" "$(printf 'mkdir -p -- %q && cd %q && xargs -0r mkdir -pv --' "${REPODEST#*:}"{,})"
if ! rsync ${dryrun} "${rsync_flags[@]}" \
-0 --files-from="$file_list" \
- ${WORKDIR}/staging \
- ${REPODEST}/
+ "${WORKDIR}/staging" \
+ "${REPODEST}/"
then
error "Sync failed, try again"
return 1
@@ -242,7 +242,7 @@ release_packages() {
fi
msg "Running db-update on repos"
- ssh ${REPODEST%%:*} "$(printf 'STAGING=%q dbscripts/db-update' "${REPODEST#*:}")"
+ ssh "${REPODEST%%:*}" "$(printf 'STAGING=%q dbscripts/db-update' "${REPODEST#*:}")"
if [[ -n $HOOKPOSTRELEASE ]]; then
msg "Running HOOKPOSTRELEASE..."