summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcpan2cruxPorts/rebuild29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpan2cruxPorts/rebuild b/cpan2cruxPorts/rebuild
new file mode 100755
index 0000000..3702b21
--- /dev/null
+++ b/cpan2cruxPorts/rebuild
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e
+
+cd "${0%/*}"
+
+for pkg in p5-*/Pkgfile; do
+ cd "${pkg%/*}"
+ eval "$(
+ grep '^release=' 'Pkgfile'
+ )"
+ sed -i '
+ /^release=/ s@=.*$@='"$((release+1))"'@
+ ' 'Pkgfile'
+
+ sudo -u pkgmk fakeroot pkgmk -if -is -f
+ pkgmk -uf
+ if git status --porcelain | grep -qF " cpan2cruxPorts/${pkg%/*}/.footprint"; then
+ pkgmk -us -sk '/etc/ports/deepthought.sec'
+ git add 'Pkgfile' '.footprint' '.signature'
+ else
+ git checkout 'Pkgfile'
+ fi
+ cd ..
+done
+
+if [ -n "$(git status --porcelain)" ]; then
+ git commit -m'rebuild cpan2cruxPorts'
+fi