mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2025-03-09 15:39:58 +00:00
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.
This commit is contained in:
parent
4ffed54724
commit
9e5538c195
5 changed files with 75 additions and 62 deletions
|
@ -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
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue