windows/src/entry.sh

40 lines
950 B
Bash
Raw Normal View History

2024-01-14 13:49:42 +00:00
#!/usr/bin/env bash
set -Eeuo pipefail
2024-01-20 16:03:59 +00:00
APP="Windows"
BOOT_MODE="windows"
2024-01-20 16:03:59 +00:00
SUPPORT="https://github.com/dockur/windows"
2024-01-14 14:19:58 +00:00
2024-01-14 13:49:42 +00:00
cd /run
. reset.sh # Initialize system
. install.sh # Run installation
2024-01-14 13:49:42 +00:00
. disk.sh # Initialize disks
. display.sh # Initialize graphics
. network.sh # Initialize network
2024-02-07 22:48:38 +00:00
. samba.sh # Configure samba
2024-01-14 13:49:42 +00:00
. boot.sh # Configure boot
. proc.sh # Initialize processor
. power.sh # Configure shutdown
2024-01-14 13:49:42 +00:00
. config.sh # Configure arguments
trap - ERR
2024-01-20 16:03:59 +00:00
info "Booting $APP using $VERS..."
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
2024-01-14 13:49:42 +00:00
if [[ "$CONSOLE" == [Yy]* ]]; then
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
fi
{ 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 | tee "$QEMU_PTY" &
wait $! || :
sleep 1 & wait $!
finish 0