vmctl/src/qemu-arch

32 lines
553 B
Bash
Executable File

#!/bin/bash
function usage() {
actions=$(find "$srcdir/actions" -maxdepth 1 -name '*.sh' | xargs basename | cut -d. -f1)
cat <<EOF
Usage: $(basename "$0") <action>
Run $(basename "$0") <action> --help for more details.
Available actions:
$actions
EOF
exit 1
}
if [ -L "$0" ]; then
export srcdir="$(dirname "$(readlink -f "$0")")"
else
export srcdir="$(cd "$(dirname "$0")" && pwd)"
fi
source "$srcdir/helpers/common.sh"
action=$1
shift
case "$action" in
install) source "$srcdir/actions/install.sh";;
*) usage;;
esac