diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/abslibre-tools/librerelease | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 70ed128..06a26e8 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -53,9 +53,9 @@ readonly rsync_flags=( # Functions #################################################################### -list0_files() { - find -L "${WORKDIR}/staging" -type f -print0 | xargs -0 realpath -z --relative-to="${WORKDIR}/staging" -} +list0_files() ( + cd "$WORKDIR" && find -L 'staging' -type f -print0 +) # This function is taken almost verbatim from makepkg create_signature() { @@ -111,7 +111,9 @@ clean_files() { fi msg "Removing files from local staging directory" - cd "${WORKDIR}/staging" && xargs -0 -a "$file_list" "${rmcmd[@]}" + cd "${WORKDIR}/staging" && xargs -0r -a "$file_list" "${rmcmd[@]}" + cd "${WORKDIR}/staging" && find . -mindepth 1 -type d -empty \ + -exec rmdir -p {} + 2>/dev/null } ################################################################################ @@ -221,7 +223,7 @@ release_packages() { msg "%s to upload" "$(cd "${WORKDIR}/staging" && du -hc --files0-from="$file_list" | sed -n '$s/\t.*//p')" msg "Uploading packages..." - xargs -0 -a "$file_list" dirname -z | ssh ${REPODEST%%:*} "$(printf 'mkdir -p -- %q && cd %q && xargs -0 mkdir -pv --' "${REPODEST#*:}" "${REPODEST#*:}")" + xargs -0r -a "$file_list" dirname -z | ssh ${REPODEST%%:*} "$(printf 'mkdir -p -- %q && cd %q && xargs -0r mkdir -pv --' "${REPODEST#*:}" "${REPODEST#*:}")" if ! rsync ${dryrun} "${rsync_flags[@]}" \ -0 --files-from="$file_list" \ ${WORKDIR}/staging \ |