windows/src/entry.sh

33 lines
809 B
Bash
Raw Normal View History

2024-01-14 14:49:42 +01:00
#!/usr/bin/env bash
set -Eeuo pipefail
2024-01-20 17:03:59 +01:00
APP="Windows"
BOOT_MODE="windows"
2024-01-20 17:03:59 +01:00
SUPPORT="https://github.com/dockur/windows"
2024-01-14 15:19:58 +01:00
2024-01-14 14:49:42 +01:00
cd /run
. reset.sh # Initialize system
. install.sh # Run installation
2024-01-14 14:49:42 +01:00
. disk.sh # Initialize disks
. display.sh # Initialize graphics
. network.sh # Initialize network
. boot.sh # Configure boot
. proc.sh # Initialize processor
. power.sh # Configure shutdown
2024-01-14 14:49:42 +01:00
. config.sh # Configure arguments
trap - ERR
2024-01-20 17:03:59 +01:00
info "Booting $APP using $VERS..."
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
2024-01-14 14:49:42 +01:00
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
terminal
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
cat "$QEMU_TERM" 2>/dev/null & wait $! || :
sleep 1 && finish 0