forked from foxlet/macOS-Simple-KVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jumpstart.sh
executable file
·39 lines (33 loc) · 874 Bytes
/
jumpstart.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# jumpstart.sh: Fetches BaseSystem and converts it to a viable format.
# by Foxlet <foxlet@furcode.co>
TOOLS=$PWD/tools
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."
echo
}
error() {
local error_message="$*"
echo "${error_message}" 1>&2;
}
argument="$1"
case $argument in
-h|--help)
print_usage
;;
-s|--high-sierra)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.13 || exit 1;
;;
-m|--mojave)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.14 || exit 1;
;;
-c|--catalina|*)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.15 || exit 1;
;;
esac
"$TOOLS/dmg2img" "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img"