From 44e0707d428de04919a33f325d4e612335bdb777 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 28 Apr 2021 13:04:48 +0200 Subject: good testing environment --- run_archiso | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100755 run_archiso (limited to 'run_archiso') diff --git a/run_archiso b/run_archiso new file mode 100755 index 0000000..983a003 --- /dev/null +++ b/run_archiso @@ -0,0 +1,174 @@ +#!/usr/bin/env bash +# +# Copyright (C) 2020 David Runge +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# A simple script to run an archiso image using qemu. The image can be booted +# using BIOS or UEFI. +# +# Requirements: +# - qemu +# - edk2-ovmf (when UEFI booting) + + +set -eu + +print_help() { + local usagetext + IFS='' read -r -d '' usagetext < 0 )); then + while getopts 'abc:dhi:suv' flag; do + case "$flag" in + a) + accessibility='on' + ;; + b) + boot_type='bios' + ;; + c) + oddimage="$OPTARG" + ;; + d) + mediatype='hd' + ;; + h) + print_help + exit 0 + ;; + i) + image="$OPTARG" + ;; + u) + boot_type='uefi' + ;; + s) + secure_boot='on' + ;; + v) + display='none' + qemu_options+=(-vnc 'vnc=0.0.0.0:0,vnc=[::]:0') + ;; + *) + printf '%s\n' "Error: Wrong option. Try 'run_archiso -h'." + exit 1 + ;; + esac + done +else + print_help + exit 1 +fi + +check_image +run_image -- cgit v1.2.3