1
0
Fork 0
mirror of https://github.com/foxlet/macOS-Simple-KVM.git synced 2024-11-23 19:49:41 +01:00
macOS-Simple-KVM/jumpstart.sh

44 lines
1.1 KiB
Bash
Raw Normal View History

2019-04-23 05:20:12 +02:00
#!/bin/bash
# jumpstart.sh: Fetches BaseSystem and converts it to a viable format.
2019-04-25 22:59:22 +02:00
# by Foxlet <foxlet@furcode.co>
2019-04-23 05:20:12 +02:00
TOOLS=$PWD/tools
2019-06-07 01:36:28 +02:00
print_usage() {
echo
echo "Usage: $0"
echo
echo " -s, --high-sierra Fetch High Sierra media."
echo " -m, --mojave Fetch Mojave media."
echo " -c, --catalina Fetch Catalina media."
2020-06-22 22:48:59 +02:00
echo " -b, --big-sur Fetch Big Sur media."
2019-06-07 01:36:28 +02:00
echo
}
error() {
2019-07-19 21:44:21 +02:00
local error_message="$*"
2019-06-07 01:36:28 +02:00
echo "${error_message}" 1>&2;
}
argument="$1"
case $argument in
2019-07-19 21:44:21 +02:00
-h|--help)
print_usage
;;
2019-06-07 01:36:28 +02:00
-s|--high-sierra)
2020-06-22 22:48:59 +02:00
"$TOOLS/FetchMacOS/fetch.sh" -v 10.13 -k BaseSystem || exit 1;
2019-06-07 01:36:28 +02:00
;;
-m|--mojave)
2020-06-22 22:48:59 +02:00
"$TOOLS/FetchMacOS/fetch.sh" -v 10.14 -k BaseSystem || exit 1;
;;
-b|--big-sur)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.16 -c DeveloperSeed -p 001-18401-003 || exit 1;
2019-06-07 01:36:28 +02:00
;;
-c|--catalina|*)
2020-06-22 22:48:59 +02:00
"$TOOLS/FetchMacOS/fetch.sh" -v 10.15 -k BaseSystem || exit 1;
2019-06-07 01:36:28 +02:00
;;
esac
2019-07-19 21:44:21 +02:00
"$TOOLS/dmg2img" "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img"