mirror of
https://github.com/sickcodes/osx-serial-generator.git
synced 2026-06-06 06:44:57 -06:00
Merge pull request #25 from ChandonPierre/cpierre/zsh
fix: remove non-POSIX compliant shell expansion
This commit is contained in:
commit
1e2302d185
@ -228,14 +228,14 @@ generate_bootdisk () {
|
|||||||
echo 'You specified both a custom plist FILE & custom plist URL.'
|
echo 'You specified both a custom plist FILE & custom plist URL.'
|
||||||
echo 'Use only one of those options.'
|
echo 'Use only one of those options.'
|
||||||
elif [ "${MASTER_PLIST_URL}" ]; then
|
elif [ "${MASTER_PLIST_URL}" ]; then
|
||||||
wget -O "${MASTER_PLIST:=./config-custom.plist}" "${MASTER_PLIST_URL}"
|
curl -L -o "${MASTER_PLIST:=./config-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
else
|
else
|
||||||
# default is config-nopicker-custom.plist from OSX-KVM with placeholders used in Docker-OSX
|
# default is config-nopicker-custom.plist from OSX-KVM with placeholders used in Docker-OSX
|
||||||
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
curl -L -o "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e ./opencore-image-ng.sh ] \
|
[ -e ./opencore-image-ng.sh ] \
|
||||||
|| { wget "${OPENCORE_IMAGE_MAKER_URL}" \
|
|| { curl -OL "${OPENCORE_IMAGE_MAKER_URL}" \
|
||||||
&& chmod +x opencore-image-ng.sh ; }
|
&& chmod +x opencore-image-ng.sh ; }
|
||||||
|
|
||||||
# plist required for bootdisks, so create anyway.
|
# plist required for bootdisks, so create anyway.
|
||||||
|
|||||||
@ -222,7 +222,7 @@ build_mac_serial () {
|
|||||||
|
|
||||||
download_vendor_mac_addresses () {
|
download_vendor_mac_addresses () {
|
||||||
# download the MAC Address vendor list
|
# download the MAC Address vendor list
|
||||||
[ -e "${MAC_ADDRESSES_FILE:=vendor_macs.tsv}" ] || wget -O "${MAC_ADDRESSES_FILE}" https://gitlab.com/wireshark/wireshark/-/raw/master/manuf
|
[ -e "${MAC_ADDRESSES_FILE:=vendor_macs.tsv}" ] || curl -L -o "${MAC_ADDRESSES_FILE}" https://gitlab.com/wireshark/wireshark/-/raw/master/manuf
|
||||||
}
|
}
|
||||||
|
|
||||||
download_qcow_efi_folder () {
|
download_qcow_efi_folder () {
|
||||||
@ -328,16 +328,16 @@ EOF
|
|||||||
echo 'You specified both a custom plist FILE & custom plist URL.'
|
echo 'You specified both a custom plist FILE & custom plist URL.'
|
||||||
echo 'Use only one of those options.'
|
echo 'Use only one of those options.'
|
||||||
elif [ "${MASTER_PLIST_URL}" ]; then
|
elif [ "${MASTER_PLIST_URL}" ]; then
|
||||||
wget -O "${MASTER_PLIST:=./config-custom.plist}" "${MASTER_PLIST_URL}"
|
curl -L -o "${MASTER_PLIST:=./config-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
else
|
else
|
||||||
# default is config-nopicker-custom.plist from OSX-KVM with placeholders used in Docker-OSX
|
# default is config-nopicker-custom.plist from OSX-KVM with placeholders used in Docker-OSX
|
||||||
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
curl -L -o "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${OUTPUT_DIRECTORY}/plists"
|
mkdir -p "${OUTPUT_DIRECTORY}/plists"
|
||||||
source "${OUTPUT_ENV_FILE}"
|
source "${OUTPUT_ENV_FILE}"
|
||||||
ROM="${MAC_ADDRESS//\:/}"
|
ROM="${MAC_ADDRESS//\:/}"
|
||||||
ROM="${ROM,,}"
|
ROM="$(awk '{print tolower($0)}' <<< "${ROM}")"
|
||||||
sed -e s/\{\{DEVICE_MODEL\}\}/"${DEVICE_MODEL}"/g \
|
sed -e s/\{\{DEVICE_MODEL\}\}/"${DEVICE_MODEL}"/g \
|
||||||
-e s/\{\{SERIAL\}\}/"${SERIAL}"/g \
|
-e s/\{\{SERIAL\}\}/"${SERIAL}"/g \
|
||||||
-e s/\{\{BOARD_SERIAL\}\}/"${BOARD_SERIAL}"/g \
|
-e s/\{\{BOARD_SERIAL\}\}/"${BOARD_SERIAL}"/g \
|
||||||
@ -352,7 +352,7 @@ EOF
|
|||||||
# make bootdisk qcow2 format if --bootdisks, but also if you set the bootdisk filename
|
# make bootdisk qcow2 format if --bootdisks, but also if you set the bootdisk filename
|
||||||
if [ "${CREATE_BOOTDISKS}" ] || [ "${OUTPUT_BOOTDISK}" ]; then
|
if [ "${CREATE_BOOTDISKS}" ] || [ "${OUTPUT_BOOTDISK}" ]; then
|
||||||
[ -e ./opencore-image-ng.sh ] \
|
[ -e ./opencore-image-ng.sh ] \
|
||||||
|| { wget "${OPENCORE_IMAGE_MAKER_URL}" \
|
|| { curl -L -O "${OPENCORE_IMAGE_MAKER_URL}" \
|
||||||
&& chmod +x opencore-image-ng.sh ; }
|
&& chmod +x opencore-image-ng.sh ; }
|
||||||
mkdir -p "${OUTPUT_DIRECTORY}/bootdisks"
|
mkdir -p "${OUTPUT_DIRECTORY}/bootdisks"
|
||||||
./opencore-image-ng.sh \
|
./opencore-image-ng.sh \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user