Merge pull request #29 from kbernhagen/macos-installer-updates

preinstall remove old FAHControl
This commit is contained in:
Joseph Coffland 2018-05-11 12:38:08 -07:00 committed by GitHub
commit 47b337f725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

18
osx/scripts/preinstall Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash -e
# fahcontrol preinstall
# delete old app, so system will not relocate if bundle id has changed
# also delete improperly moved app and cruft
A1="/Applications/Folding@home/FAHControl.app"
A2="/Applications/Folding@home/FAHControl/FAHControl.app"
F1="/Applications/Folding@home/FAHControl/.DS_Store"
D1="/Applications/Folding@home/FAHControl"
[ -d "$A1" ] && rm -rf "$A1" || true
[ -d "$A2" ] && rm -rf "$A2" || true
[ -f "$F1" ] && rm -f "$F1" || true
[ -d "$D1" ] && rmdir "$D1" || true