-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch.sh
More file actions
executable file
·23 lines (18 loc) · 909 Bytes
/
patch.sh
File metadata and controls
executable file
·23 lines (18 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
DOWNLOAD_FILE=./Autodesk\ Fusion\ Installer.dmg
JSON_CONFIG=~/Desktop/Install\ Autodesk\ Fusion.app/Contents/Resources/resources/precheck_config.json
MOUNT_POINT=/Volumes/Autodesk\ Fusion\ Installer
if [ ! -f "$DOWNLOAD_FILE" ]; then
echo "Downloading Fusion Client Downloader image..."
curl -o "$DOWNLOAD_FILE" "https://dl.appstreaming.autodesk.com/production/installers/Fusion%20Client%20Downloader.dmg"
fi
if [ ! -e ~/Desktop/Install\ Autodesk\ Fusion.app ]; then
hdiutil attach "$DOWNLOAD_FILE"
cp -R "$MOUNT_POINT/Install Autodesk Fusion.app" ~/Desktop/
hdiutil detach "$MOUNT_POINT"
fi
echo "Modifying JSON configuration.."
jq '.prechecks.CheckMacOSHardwareConfig.mandatory = "No"' "$JSON_CONFIG" > /tmp/precheck_config.json.tmp
mv /tmp/precheck_config.json.tmp "$JSON_CONFIG"
echo "Removing quarantine from modified application"
xattr -rd com.apple.quarantine "$JSON_CONFIG"