Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | cd |
| 4 | |
| 5 | [ "${IDENT}" ] || IDENT=$(mktemp -u XXXXXXXX) |
| 6 | |
| 7 | CCACHE=.ccache/anita-${IDENT}.img |
| 8 | |
| 9 | [ -f ${CCACHE} ] || zcat cache.img.gz >${CCACHE} |
| 10 | |
Nico Huber | 48b1fde | 2022-12-11 17:15:27 +0000 | [diff] [blame^] | 11 | AV_ARGS="${ANITA_VMM_ARGS} -hdb ${CCACHE}" |
| 12 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 13 | if [ $# -eq 0 ]; then |
Nico Huber | 48b1fde | 2022-12-11 17:15:27 +0000 | [diff] [blame^] | 14 | exec anita --vmm-args "${AV_ARGS}" --memory-size=${MEM_SIZE} \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 15 | interact ${INST_IMG} |
| 16 | else |
Nico Huber | 48b1fde | 2022-12-11 17:15:27 +0000 | [diff] [blame^] | 17 | exec anita --vmm-args "${AV_ARGS}" --memory-size=${MEM_SIZE} \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 18 | --persist --run ". ./init && manitest \"$*\"" \ |
| 19 | boot ${INST_IMG} |
| 20 | fi |