| 
									
										
										
										
											2024-01-14 14:49:42 +01:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | set -Eeuo pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-13 10:20:18 +01:00
										 |  |  | : "${BOOT_MODE:="windows"}" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-20 17:03:59 +01:00
										 |  |  | APP="Windows" | 
					
						
							|  |  |  | 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 | 
					
						
							| 
									
										
										
										
											2024-04-30 22:57:44 +02:00
										 |  |  | . define.sh     # Define versions | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | . install.sh    # Run installation | 
					
						
							| 
									
										
										
										
											2024-01-14 14:49:42 +01:00
										 |  |  | . disk.sh       # Initialize disks | 
					
						
							|  |  |  | . display.sh    # Initialize graphics | 
					
						
							|  |  |  | . network.sh    # Initialize network | 
					
						
							| 
									
										
										
										
											2024-02-07 23:48:38 +01:00
										 |  |  | . samba.sh      # Configure samba | 
					
						
							| 
									
										
										
										
											2024-01-14 14:49:42 +01:00
										 |  |  | . boot.sh       # Configure boot | 
					
						
							|  |  |  | . proc.sh       # Initialize processor | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | . power.sh      # Configure shutdown | 
					
						
							| 
									
										
										
										
											2024-01-14 14:49:42 +01:00
										 |  |  | . config.sh     # Configure arguments | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | trap - ERR | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 06:20:04 +02:00
										 |  |  | info "Booting ${APP}${BOOT_DESC}..." | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | [[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo | 
					
						
							| 
									
										
										
										
											2024-01-14 14:49:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | { qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || : | 
					
						
							|  |  |  | (( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | terminal | 
					
						
							| 
									
										
										
										
											2024-04-30 22:57:44 +02:00
										 |  |  | ( sleep 10; boot ) & | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | tail -fn +0 "$QEMU_LOG" 2>/dev/null & | 
					
						
							| 
									
										
										
										
											2024-01-24 05:38:16 +01:00
										 |  |  | cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" & | 
					
						
							|  |  |  | wait $! || : | 
					
						
							| 
									
										
										
										
											2024-01-23 22:38:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-11 13:30:07 +01:00
										 |  |  | sleep 1 & wait $! | 
					
						
							|  |  |  | finish 0 |