From 61baaccae8553b77cf37aa555796cce58e5f23a7 Mon Sep 17 00:00:00 2001 From: paulbeach Date: Mon, 17 Jul 2017 14:33:50 +0200 Subject: [PATCH] More changes for the installer --- builds/posix/preupgrade-script | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 builds/posix/preupgrade-script diff --git a/builds/posix/preupgrade-script b/builds/posix/preupgrade-script new file mode 100644 index 0000000000..09174daba0 --- /dev/null +++ b/builds/posix/preupgrade-script @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Script args: +# $0: full path to script +# $1: full path to top level package dir, no trailing slash +# $2: full path to installed location +# $3: ????? Path to install Volume???? +# $4: ????? + +FB_FW="/Library/Frameworks/Firebird.framework" +FB2_UDF="/Library/Frameworks/Firebird.framework/Resources/English.lproj/var/UDF" +FB3_UDF="/Library/Frameworks/Firebird.framework/Resources/UDF" + +if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/security2.fdb"; then + mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/security2.fdb" /tmp/fb-security-database-update2.fdb +fi + +if test -f "$FB_FW/Versions/A/Resources/security3.fdb"; then + mv -f "$FB_FW/Versions/A/Resources/security3.fdb" /tmp/fb-security-database-update3.fdb +fi + +if test -f "$FB_FW/Versions/A/Resources/English.lproj/var/aliases.conf"; then + mv -f "$FB_FW/Versions/A/Resources/English.lproj/var/aliases.conf" /tmp/fb-aliases.conf +fi + +if test -f "$FB_FW/Versions/A/Resources/databases.conf"; then + mv -f "$FB_FW/Versions/A/Resources/databases.conf" /tmp/fb-databases.conf +fi + +rm $FB_UDF/fbudf* +rm $FB_UDF/ib_udf* +mkdir /tmp/UDF_save +cp $FB_UDF/*.* /tmp/UDF_save + +if [ -f /Library/LaunchDaemons/org.firebird.gds.plist ]; then + launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist + rm /Library/LaunchDaemons/org.firebird.gds.plist +fi + +rm -fr "$FB_FW" +rm -fr /tmp/firebird + +exit 0