summaryrefslogtreecommitdiffstats
path: root/util/manibuilder/anita-wrapper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/manibuilder/anita-wrapper.sh')
-rw-r--r--util/manibuilder/anita-wrapper.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/manibuilder/anita-wrapper.sh b/util/manibuilder/anita-wrapper.sh
new file mode 100644
index 000000000..617e17f83
--- /dev/null
+++ b/util/manibuilder/anita-wrapper.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+cd
+
+[ "${IDENT}" ] || IDENT=$(mktemp -u XXXXXXXX)
+
+CCACHE=.ccache/anita-${IDENT}.img
+
+[ -f ${CCACHE} ] || zcat cache.img.gz >${CCACHE}
+
+if [ $# -eq 0 ]; then
+ exec anita --vmm-args "-hdb ${CCACHE}" interact ${INST_IMG}
+else
+ exec anita --vmm-args "-hdb ${CCACHE}" --persist \
+ --run ". ./init && manitest \"$*\"" \
+ boot ${INST_IMG}
+fi