summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 23:21:44 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 23:21:44 -0500
commit39b13f63d0fd89bfa3cae1feb8744fb100eb5651 (patch)
tree7adf960012f2b7d81deec18e15ca6e2d22fec6c1
parent8c52811113e58289daec68289a503aee29ee1380 (diff)
-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
}