From b618a7713d55da082f933b95e3209c91edc3e08c Mon Sep 17 00:00:00 2001 From: Kevin Bernhagen Date: Fri, 11 May 2018 08:44:33 -0700 Subject: [PATCH] preinstall remove old FAHControl remove old app so system will not relocate if app bundle id has changed --- osx/scripts/preinstall | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 osx/scripts/preinstall diff --git a/osx/scripts/preinstall b/osx/scripts/preinstall new file mode 100755 index 00000000..0d05621d --- /dev/null +++ b/osx/scripts/preinstall @@ -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