summaryrefslogtreecommitdiff
path: root/src/abslibre-tools/librerelease
diff options
context:
space:
mode:
Diffstat (limited to 'src/abslibre-tools/librerelease')
-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..."