summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-05-12 19:59:27 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-05-12 19:59:27 +0200
commitd1e86af42349e13c58ccfade6f852e8413a08d29 (patch)
treed18065871afe7eaec3f36c0bb4f35ca20331c988
parent0da0ce428e49da5b5ee96b0699090fe503e8d563 (diff)
downloadbin-d1e86af42349e13c58ccfade6f852e8413a08d29.tar.gz
bin-d1e86af42349e13c58ccfade6f852e8413a08d29.tar.xz
Add update-perl-pkg
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xupdate-perl-pkg38
1 files changed, 38 insertions, 0 deletions
diff --git a/update-perl-pkg b/update-perl-pkg
new file mode 100755
index 0000000..b8cd65f
--- /dev/null
+++ b/update-perl-pkg
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+set -euo pipefail
+
+pkg=$1
+
+targets=(~/arch/{community,extra})
+found_pkg=0
+
+for target in "${targets[@]}"; do
+ if [[ -f "$target/$pkg/trunk/PKGBUILD" ]]; then
+ found_pkg=1
+ cd "$target/$pkg"
+ svn up
+ cd trunk
+ break
+ fi
+done
+
+if ((!found_pkg)); then
+ echo "Package not found. Creating not supported here"
+ exit 1
+fi
+
+case "${target##*/}" in
+ extra) relcmd=(extrapkg);;
+ community) relcmd=(communitypkg);;
+ *) echo "Unable to determine release command for target '$target'"; exit 1; ;;
+esac
+
+gen-perl-pkg "$pkg"
+ch update 64
+ch cbuild 64
+checkpkg
+echo "About to release with command: ${relcmd[*]}"
+read -r -p "Hit enter to release or ^C to abort"
+"${relcmd[@]}" "upstream update"
+