summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/librerelease21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 06a26e8..aca8fef 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -53,9 +53,10 @@ readonly rsync_flags=(
# Functions ####################################################################
-list0_files() (
- cd "$WORKDIR" && find -L 'staging' -type f -print0
-)
+list0_files() {
+ find -L "${WORKDIR}/staging" -type f \
+ -exec realpath -z --relative-to="${WORKDIR}/staging" {} +
+}
# This function is taken almost verbatim from makepkg
create_signature() {
@@ -84,19 +85,19 @@ sign_packages() {
warning "It's better to have \`%s\` running to sign packages in batches" 'gpg-agent --daemon'
fi
- for package in $(find "${WORKDIR}/staging/" -type f -iname '*.pkg.tar.?z'); do
- if [[ -f "${package}.sig" ]]; then
- msg2 "Package signature found, verifying..."
+ for file in $(find "${WORKDIR}/staging/" -type f -not -iname '*.sig'); do
+ if [[ -f "${file}.sig" ]]; then
+ msg2 "File signature found, verifying..."
# Verify that the signature is correct, else remove for re-signing
- if ! gpg --quiet --verify "${package}.sig" >/dev/null 2>&1; then
+ if ! gpg --quiet --verify "${file}.sig" >/dev/null 2>&1; then
error "Failed! Re-signing..."
- rm -f "${package}.sig"
+ rm -f "${file}.sig"
fi
fi
- if ! [[ -f "${package}.sig" ]]; then
- create_signature "$package" || return 2
+ if ! [[ -f "${file}.sig" ]]; then
+ create_signature "$file" || return 2
fi
done
}