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

[TOOLS] Enable Big Sur support.

This commit is contained in:
Foxlet 2020-06-22 16:48:59 -04:00
parent 3507989a19
commit 2db761ddd9
2 changed files with 16 additions and 5 deletions

View file

@ -12,6 +12,7 @@ print_usage() {
echo " -s, --high-sierra Fetch High Sierra media."
echo " -m, --mojave Fetch Mojave media."
echo " -c, --catalina Fetch Catalina media."
echo " -b, --big-sur Fetch Big Sur media."
echo
}
@ -26,13 +27,16 @@ case $argument in
print_usage
;;
-s|--high-sierra)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.13 || exit 1;
"$TOOLS/FetchMacOS/fetch.sh" -v 10.13 -k BaseSystem || exit 1;
;;
-m|--mojave)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.14 || exit 1;
"$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;
;;
-c|--catalina|*)
"$TOOLS/FetchMacOS/fetch.sh" -v 10.15 || exit 1;
"$TOOLS/FetchMacOS/fetch.sh" -v 10.15 -k BaseSystem || exit 1;
;;
esac

View file

@ -66,6 +66,12 @@ class Filesystem:
class SoftwareService:
# macOS 10.15 is available in 4 different catalogs from SoftwareScan
catalogs = {
"10.16": {
"CustomerSeed":"https://swscan.apple.com/content/catalogs/others/index-10.16customerseed-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
"DeveloperSeed":"https://swscan.apple.com/content/catalogs/others/index-10.16seed-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
"PublicSeed":"https://swscan.apple.com/content/catalogs/others/index-10.16beta-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
"PublicRelease":"https://swscan.apple.com/content/catalogs/others/index-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
},
"10.15": {
"CustomerSeed":"https://swscan.apple.com/content/catalogs/others/index-10.15customerseed-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
"DeveloperSeed":"https://swscan.apple.com/content/catalogs/others/index-10.15seed-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
@ -133,7 +139,8 @@ class MacOSProduct:
@click.option('-v', '--catalog-version', default="10.15", help="Version of catalog.")
@click.option('-c', '--catalog-id', default="PublicRelease", help="Name of catalog.")
@click.option('-p', '--product-id', default="", help="Product ID (as seen in SoftwareUpdate).")
def fetchmacos(output_dir="BaseSystem/", catalog_version="10.15", catalog_id="PublicRelease", product_id=""):
@click.option('-k', '--keyword', default=None, help="Keyword filter for packages.")
def fetchmacos(output_dir="BaseSystem/", catalog_version="10.15", catalog_id="PublicRelease", product_id="", keyword=None):
# Get the remote catalog data
remote = SoftwareService(catalog_version, catalog_id)
catalog = remote.getcatalog()
@ -152,7 +159,7 @@ def fetchmacos(output_dir="BaseSystem/", catalog_version="10.15", catalog_id="Pu
logging.info("Selected macOS Product: {}".format(product_id))
# Download package to disk
product.fetchpackages(output_dir, keyword="BaseSystem")
product.fetchpackages(output_dir, keyword=keyword)
if __name__ == "__main__":
fetchmacos()