entry.sh 809 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env bash
  2. set -Eeuo pipefail
  3. APP="Windows"
  4. BOOT_MODE="windows"
  5. SUPPORT="https://github.com/dockur/windows"
  6. cd /run
  7. . reset.sh # Initialize system
  8. . install.sh # Run installation
  9. . disk.sh # Initialize disks
  10. . display.sh # Initialize graphics
  11. . network.sh # Initialize network
  12. . boot.sh # Configure boot
  13. . proc.sh # Initialize processor
  14. . power.sh # Configure shutdown
  15. . config.sh # Configure arguments
  16. trap - ERR
  17. info "Booting $APP using $VERS..."
  18. [[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
  19. { qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
  20. (( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
  21. terminal
  22. tail -fn +0 "$QEMU_LOG" 2>/dev/null &
  23. cat "$QEMU_TERM" 2>/dev/null & wait $! || :
  24. sleep 1 && finish 0