diff options
| author | sickcodes <[email protected]> | 2021-02-25 08:52:56 +0000 |
|---|---|---|
| committer | sickcodes <[email protected]> | 2021-02-25 08:52:56 +0000 |
| commit | 9e5538c195b30ad55d24e4976a0f9ad67f70a446 (patch) | |
| tree | 3176bec99c2c4398e7e28add815172fb2a1eedd8 /custom/generate-specific-bootdisk.sh | |
| parent | WIP generate-specific-bootdisk.sh (diff) | |
| download | docker-osx-9e5538c195b30ad55d24e4976a0f9ad67f70a446.tar.xz docker-osx-9e5538c195b30ad55d24e4976a0f9ad67f70a446.zip | |
Add Linux, libguestfs for building bootdisks within the Docker container. Add CPU_STRING to optionally override the whole CPU string. Unify variable names in ./custom.
Diffstat (limited to 'custom/generate-specific-bootdisk.sh')
| -rwxr-xr-x | custom/generate-specific-bootdisk.sh | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/custom/generate-specific-bootdisk.sh b/custom/generate-specific-bootdisk.sh index 2717d22..46c3571 100755 --- a/custom/generate-specific-bootdisk.sh +++ b/custom/generate-specific-bootdisk.sh @@ -25,12 +25,12 @@ General options: --help, -h, help Display this help and exit Example: - ./genboot.sh \\ - --model iMacPro1,1 \\ - --serial C02TW0WAHX87 \\ - --board-serial C027251024NJG36UE \\ - --uuid 5CCB366D-9118-4C61-A00A-E5BAF3BED451 \\ - --mac-address A8:5C:2C:9A:46:2F \\ + ./generate-specific-bootdisk.sh \ + --model iMacPro1,1 \ + --serial C02TW0WAHX87 \ + --board-serial C027251024NJG36UE \ + --uuid 5CCB366D-9118-4C61-A00A-E5BAF3BED451 \ + --mac-address A8:5C:2C:9A:46:2F \ --output-bootdisk OpenCore-nopicker.qcow2 Author: Sick.Codes https://sick.codes/ @@ -58,21 +58,21 @@ while (( "$#" )); do ;; --serial=* ) - export SERIAL_NUMBER="${1#*=}" + export SERIAL="${1#*=}" shift ;; --serial* ) - export SERIAL_NUMBER="${2}" + export SERIAL="${2}" shift shift ;; --board-serial=* ) - export BOARD_SERIAL_NUMBER="${1#*=}" + export BOARD_SERIAL="${1#*=}" shift ;; --board-serial* ) - export BOARD_SERIAL_NUMBER="${2}" + export BOARD_SERIAL="${2}" shift shift ;; @@ -142,25 +142,25 @@ generate_bootdisk () { [[ -e ./opencore-image-ng.sh ]] || wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/custom-identity/custom/opencore-image-ng.sh && chmod +x opencore-image-ng.sh # plist required for bootdisks, so create anyway. if [[ "${DEVICE_MODEL}" ]] \ - && [[ "${SERIAL_NUMBER}" ]] \ - && [[ "${BOARD_SERIAL_NUMBER}" ]] \ + && [[ "${SERIAL}" ]] \ + && [[ "${BOARD_SERIALR}" ]] \ && [[ "${UUID}" ]] \ && [[ "${MAC_ADDRESS}" ]]; then - ROM_VALUE="${MacAddress//\:/}" - ROM_VALUE="${ROM_VALUE,,}" + ROM="${MAC_ADDRESS//\:/}" + ROM="${ROM,,}" sed -e s/{{DEVICE_MODEL}}/"${DEVICE_MODEL}"/g \ - -e s/{{SERIAL_OLD}}/"${SERIAL_NUMBER}"/g \ - -e s/{{BOARD_SERIAL_OLD}}/"${BOARD_SERIAL_NUMBER}"/g \ - -e s/{{SYSTEM_UUID_OLD}}/"${UUID}"/g \ - -e s/{{ROM_OLD}}/"${ROM_VALUE}"/g \ + -e s/{{SERIAL}}/"${SERIAL}"/g \ + -e s/{{BOARD_SERIAL}}/"${BOARD_SERIAL}"/g \ + -e s/{{UUID}}/"${UUID}"/g \ + -e s/{{ROM}}/"${ROM}"/g \ "${PLIST_MASTER}" > ./tmp.config.plist || exit 1 else cat <<EOF Error: one of the following values is missing: --model "${DEVICE_MODEL:-MISSING}" ---serial "${SERIAL_NUMBER:-MISSING}" ---board-serial "${BOARD_SERIAL_NUMBER:-MISSING}" +--serial "${SERIAL:-MISSING}" +--board-serial "${BOARD_SERIAL:-MISSING}" --uuid "${UUID:-MISSING}" --mac-address "${MAC_ADDRESS:-MISSING}" @@ -170,7 +170,7 @@ EOF ./opencore-image-ng.sh \ --cfg "${INPUT_PLIST:-./tmp.config.plist}" \ - --img "${OUTPUT_QCOW:-./${SERIAL_NUMBER}.OpenCore-nopicker.qcow2}" || exit 1 + --img "${OUTPUT_QCOW:-./${SERIAL}.OpenCore-nopicker.qcow2}" || exit 1 rm ./tmp.config.plist } |