summaryrefslogtreecommitdiff
path: root/pinyadmin/sbin/piny-ikiwiki-mass-rebuild
diff options
context:
space:
mode:
Diffstat (limited to 'pinyadmin/sbin/piny-ikiwiki-mass-rebuild')
-rwxr-xr-xpinyadmin/sbin/piny-ikiwiki-mass-rebuild8
1 files changed, 8 insertions, 0 deletions
diff --git a/pinyadmin/sbin/piny-ikiwiki-mass-rebuild b/pinyadmin/sbin/piny-ikiwiki-mass-rebuild
new file mode 100755
index 0000000..5abe7ba
--- /dev/null
+++ b/pinyadmin/sbin/piny-ikiwiki-mass-rebuild
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+for i in $(find /etc/ikiwiki/piny/* -maxdepth 0 -type f -iname '*.setup' -printf "%f\n" | perl -pe 's/.setup$//'); do
+ echo Rebuilding $i...
+ sudo sudo rebuildrepo $i; # two sudos needed to clear out $SUDO_USER
+done