mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-22 19:10:15 +10:00
gui_update.py: Work-around users manually moving app
Oversight from original update system, users were not expected to manually move the app to `/Applications`. This will ensure that there will always be a symlink instead
This commit is contained in:
@@ -227,18 +227,20 @@ if [ ! -d "/Library/Application Support/Dortania" ]; then
|
||||
mkdir -p "/Library/Application Support/Dortania"
|
||||
fi
|
||||
|
||||
# Check if '/Library/Application Support/Dortania/OpenCore-Patcher.app' exists
|
||||
# Check if 'OpenCore-Patcher.app' exists
|
||||
if [ -d "/Library/Application Support/Dortania/OpenCore-Patcher.app" ]; then
|
||||
rm -rf "/Library/Application Support/Dortania/OpenCore-Patcher.app"
|
||||
fi
|
||||
|
||||
if [ -d "/Applications/OpenCore-Patcher.app" ]; then
|
||||
rm -rf "/Applications/OpenCore-Patcher.app"
|
||||
fi
|
||||
|
||||
# Move '/tmp/OpenCore-Patcher.app' to '/Library/Application Support/Dortania'
|
||||
mv "{str(self.application_path)}" "/Library/Application Support/Dortania/OpenCore-Patcher.app"
|
||||
|
||||
# Check if '/Applications/OpenCore-Patcher.app' exists
|
||||
if [ ! -d "/Applications/OpenCore-Patcher.app" ]; then
|
||||
ln -s "/Library/Application Support/Dortania/OpenCore-Patcher.app" "/Applications/OpenCore-Patcher.app"
|
||||
fi
|
||||
ln -s "/Library/Application Support/Dortania/OpenCore-Patcher.app" "/Applications/OpenCore-Patcher.app"
|
||||
|
||||
# Create update.plist with info about update
|
||||
cat << EOF > "/Library/Application Support/Dortania/update.plist"
|
||||
|
||||
Reference in New Issue
Block a user