Fixed subshell logic in startup scripts.

pull/155/head
sickcodes 4 years ago
parent a651aa0369
commit f2a49b046b

@ -271,24 +271,26 @@ CMD sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" "${BOOTDISK}" 2>/dev/null |
directory* ) export IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img \ directory* ) export IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img \
;; \ ;; \
esac \ esac \
; [[ "${NOPICKER}" == true ]] && BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \ ; [[ "${NOPICKER}" == true ]] && export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \
; [[ "${GENERATE_UNIQUE}" == true ]] \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
&& ./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--count 1 \ --count 1 \
--tsv ./serial.tsv \ --tsv ./serial.tsv \
--bootdisks \ --bootdisks \
--output-bootdisk "${BOOTDISK}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
--output-env "${ENV}" \ --output-env "${ENV:=/env}" \
&& source "${ENV}" \ && source "${ENV}" \
; [[ "${GENERATE_SPECIFIC}" == true ]] \ ; } \
&& source /env \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
source /env \
|| ./Docker-OSX/custom/generate-specific-bootdisk.sh \ || ./Docker-OSX/custom/generate-specific-bootdisk.sh \
--model "${DEVICE_MODEL}" \ --model "${DEVICE_MODEL}" \
--serial "${SERIAL}" \ --serial "${SERIAL}" \
--board-serial "${BOARD_SERIAL}" \ --board-serial "${BOARD_SERIAL}" \
--uuid "${UUID}" \ --uuid "${UUID}" \
--mac-address "${MAC_ADDRESS}" \ --mac-address "${MAC_ADDRESS}" \
--output-bootdisk "${BOOTDISK}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
; } \
; case "$(file --brief /bootdisk)" in \ ; case "$(file --brief /bootdisk)" in \
QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \
;; \ ;; \

@ -141,19 +141,20 @@ ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a secur
CMD echo "${BOILERPLATE}" \ CMD echo "${BOILERPLATE}" \
&& [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \ && [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \
&& echo "Disk is being copied between layers... Please wait a minute..." \ ; echo "Disk is being copied between layers... Please wait a minute..." \
&& sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" "${BOOTDISK}" 2>/dev/null || true \ && sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" "${BOOTDISK}" 2>/dev/null || true \
; [[ "${NOPICKER}" == true ]] && export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \ ; [[ "${NOPICKER}" == true ]] && export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \
; [[ "${GENERATE_UNIQUE}" == true ]] \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
&& ./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--count 1 \ --count 1 \
--tsv ./serial.tsv \ --tsv ./serial.tsv \
--bootdisks \ --bootdisks \
--output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
--output-env "${ENV:=/env}" \ --output-env "${ENV:=/env}" \
&& source "${ENV}" \ && source "${ENV}" \
; [[ "${GENERATE_SPECIFIC}" == true ]] \ ; } \
&& source /env \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
source /env \
|| ./Docker-OSX/custom/generate-specific-bootdisk.sh \ || ./Docker-OSX/custom/generate-specific-bootdisk.sh \
--model "${DEVICE_MODEL}" \ --model "${DEVICE_MODEL}" \
--serial "${SERIAL}" \ --serial "${SERIAL}" \
@ -161,6 +162,7 @@ CMD echo "${BOILERPLATE}" \
--uuid "${UUID}" \ --uuid "${UUID}" \
--mac-address "${MAC_ADDRESS}" \ --mac-address "${MAC_ADDRESS}" \
--output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
; } \
; case "$(file --brief /bootdisk)" in \ ; case "$(file --brief /bootdisk)" in \
QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \
;; \ ;; \

@ -116,17 +116,18 @@ CMD sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" "${BOOTDISK}" 2>/dev/null |
nohup Xvfb :99 -screen 0 1920x1080x16 \ nohup Xvfb :99 -screen 0 1920x1080x16 \
& until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 1 ; done \ & until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 1 ; done \
; } \ ; } \
; [[ "${NOPICKER}" == true ]] && mv ./Launch-nopicker.sh ./Launch.sh \ ; [[ "${NOPICKER}" == true ]] && export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \
; [[ "${GENERATE_UNIQUE}" == true ]] \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
&& ./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--count 1 \ --count 1 \
--tsv ./serial.tsv \ --tsv ./serial.tsv \
--bootdisks \ --bootdisks \
--output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
--output-env "${ENV:=/env}" \ --output-env "${ENV:=/env}" \
&& source "${ENV}" \ && source "${ENV}" \
; [[ "${GENERATE_SPECIFIC}" == true ]] \ ; } \
&& source /env \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
source /env \
|| ./Docker-OSX/custom/generate-specific-bootdisk.sh \ || ./Docker-OSX/custom/generate-specific-bootdisk.sh \
--model "${DEVICE_MODEL}" \ --model "${DEVICE_MODEL}" \
--serial "${SERIAL}" \ --serial "${SERIAL}" \
@ -134,6 +135,7 @@ CMD sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" "${BOOTDISK}" 2>/dev/null |
--uuid "${UUID}" \ --uuid "${UUID}" \
--mac-address "${MAC_ADDRESS}" \ --mac-address "${MAC_ADDRESS}" \
--output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
; } \
; case "$(file --brief /bootdisk)" in \ ; case "$(file --brief /bootdisk)" in \
QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \
;; \ ;; \

Loading…
Cancel
Save