#!/usr/bin/env bash # CONSTANTS BASEDIR=$(dirname "$0") DEBIAN='images:debian/13' CONTAINER='' # FUNCTIONS function usage { echo "$(basename "$0") " } function parse_options { while [[ $# -gt 0 ]]; do case "$1" in --help | -h) usage && exit 0 ;; *) if [[ -z $CONTAINER ]]; then CONTAINER=$1 else echo >&2 "Unknown option: $1" && usage && exit 2 fi ;; esac shift 1 # Move to the next argument done [[ -n $CONTAINER ]] || ( usage && exit 1 ) } function before_start { # cold changes incus config device add $CONTAINER MIAOU-BASH disk source=/opt/miaou-bash path=/opt/miaou-bash readonly=true | grep -q 'Device MIAOU-BASH added' incus config set $CONTAINER environment.PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/miaou-bash/tools cat <