- ‘.ikiwiki/lib/IkiWiki/Plugin/action.pm’
[cyclowiki.git] / rebuild
diff --git a/rebuild b/rebuild
deleted file mode 120000 (symlink)
index c795b054e5ade51b7031abab1581a5b7e2d2f5ba..0000000000000000000000000000000000000000
--- a/rebuild
+++ /dev/null
@@ -1 +0,0 @@
-build
\ No newline at end of file
diff --git a/rebuild b/rebuild
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..cb9bacf15f498eab8a4b00e62ef3318e2517c994
--- /dev/null
+++ b/rebuild
@@ -0,0 +1,22 @@
+#!/bin/sh -eu
+# DESCRIPTION: run ikiwiki(1) compiler
+# SYNTAX: 
+# ENVIRONMENT: 
+
+# ACTION: initialize from ./
+       test -L "$0" && tool="$(readlink -e "$0")" || tool=$0
+       tool=$(readlink -e "${tool%/*}"/.)
+       root="$tool"
+# ACTION: run ikiwiki
+       if test "${0##*/}" = rebuild
+        then action=rebuild
+        else action=refresh
+        fi
+       set -x
+       ikiwiki \
+        --"$action" \
+        --setup "$root"/ikiwiki.setup \
+        \
+        --no-rcs \
+        --wrappers \
+        "$@"