mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
AutoPatcher: Add preinstall script
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
- Add `OpenCore-Legacy-Patcher.plist` for applied patch info
|
||||
- Located under `/System/Library/CoreServices`
|
||||
- Lists patch sets applied including files installed and removed
|
||||
- Add `preinstall` script to AutoPatcher
|
||||
- Removes old patcher files before installing new
|
||||
|
||||
## 0.4.4
|
||||
- Lower SIP requirement for Root Patching
|
||||
|
||||
@@ -520,6 +520,8 @@
|
||||
</dict>
|
||||
<key>PREINSTALL_PATH</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/Users/mykolagrymalyuk/Developer/OpenCore-Legacy-Patcher/payloads/InstallPackage/preinstall.sh</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
|
||||
12
payloads/InstallPackage/preinstall.sh
Executable file
12
payloads/InstallPackage/preinstall.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
app_path="/Library/Application Support/Dortania/OpenCore-Patcher.app"
|
||||
launch_agent_path="/Library/LaunchAgents/com.dortania.opencore-legacy-patcher.auto-patch.plist"
|
||||
if [ -d "$app_path" ]; then
|
||||
echo "Found OpenCore-Patcher.app, removing..."
|
||||
rm -rf "$app_path"
|
||||
fi
|
||||
|
||||
if [ -f "$launch_agent_path" ]; then
|
||||
echo "Found launch agent, removing..."
|
||||
rm -f "$launch_agent_path"
|
||||
fi
|
||||
Reference in New Issue
Block a user