Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions package/rebuild-todo
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ usage() {
-o, --offload Use offloaded builds
-h, --help Show this help text
-d, --dry-run Show the offload-build and commitpkg being ran
--import-keys Import PGP keys for packages source verification into the user's keyring
--no-build Don't build PKGBUILD
--no-publish Don't run commitpkg after building
--no-bump Don't bump pkgrel before building (default bumps pkgrel)
Expand Down Expand Up @@ -63,6 +64,7 @@ STDIN=0
NO_BUMP=0
NO_BUILD=0
PACKAGES=0
IMPORT_KEYS=0
NO_PUBLISH=0
EDIT_PKGBUILD=0
CONTINUE=0
Expand Down Expand Up @@ -112,6 +114,9 @@ while ((${#})); do
-d|--dry-run)
DRY=1
;;
--import-keys)
IMPORT_KEYS=1
;;
--testing|--staging)
REPO="$key"
;;
Expand Down Expand Up @@ -219,6 +224,22 @@ read <&1

pkgctl repo clone "${packages[@]}"

if ((IMPORT_KEYS)); then
echo "Importing PGP keys..."
# Only add paths that actually have key(s) to import and ignore paths that don't, don't exit on error
mapfile -d '' key_paths < <(find "${packages[@]/%//keys/pgp}" -type f -print0 2>/dev/null) || true

if ((${#key_paths[@]})); then
cat "${key_paths[@]}" | if [[ -z "$OFFLOAD" ]]; then
gpg --import
else
ssh build.archlinux.org gpg --import
fi
else
echo "No PGP key to import"
fi
fi

for pkg in "${packages[@]}"; do
pushd "$pkg" &>/dev/null

Expand Down
Loading