summaryrefslogtreecommitdiffstats
path: root/util/manibuilder/anita-wrapper.sh
blob: 617e17f83332b937800c6131de3abbad8f6563d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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