| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
# |
| 4 |
# This library is part of the FirebirdSQL project |
| 5 |
# |
| 6 |
# This library is free software; you can redistribute it and/or |
| 7 |
# modify it under the terms of the GNU Lesser General Public |
| 8 |
# License as published by the Free Software Foundation; either |
| 9 |
# version 2.1 of the License, or (at your option) any later version. |
| 10 |
# You may obtain a copy of the Licence at |
| 11 |
# http://www.gnu.org/licences/lgpl.html |
| 12 |
# |
| 13 |
# As a special exception this file can also be included in modules |
| 14 |
# with other source code as long as that source code has been |
| 15 |
# released under an Open Source Initiative certificed licence. |
| 16 |
# More information about OSI certification can be found at: |
| 17 |
# http://www.opensource.org |
| 18 |
# |
| 19 |
# This module is distributed in the hope that it will be useful, |
| 20 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
# GNU Lesser General Public Licence for more details. |
| 23 |
# |
| 24 |
# This module was created by members of the firebird development |
| 25 |
# team. All individual contributions remain the Copyright (C) of |
| 26 |
# those individuals and all rights are reserved. Contributors to |
| 27 |
# this file are either listed below or can be obtained from a CVS |
| 28 |
# history command. |
| 29 |
# |
| 30 |
# Created by: Mark O'Donohue <[email protected]> |
| 31 |
# |
| 32 |
# Contributor(s): |
| 33 |
# |
| 34 |
# |
| 35 |
|
| 36 |
|
| 37 |
#------------------------------------------------------------------------ |
| 38 |
# removeInstalledFiles |
| 39 |
# |
| 40 |
removeInstalledFiles() { |
| 41 |
manifestFile=$FBRootDir/misc/manifest.txt |
| 42 |
|
| 43 |
if [ ! -f $manifestFile ] |
| 44 |
then |
| 45 |
return |
| 46 |
fi |
| 47 |
|
| 48 |
origDir=`pwd` |
| 49 |
|
| 50 |
cd / |
| 51 |
|
| 52 |
for i in `cat $manifestFile` |
| 53 |
do |
| 54 |
if [ -f $i -o -L $i ] |
| 55 |
then |
| 56 |
rm -f $i |
| 57 |
#echo $i |
| 58 |
fi |
| 59 |
done |
| 60 |
|
| 61 |
cd "$origDir" |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
#------------------------------------------------------------------------ |
| 66 |
# removeUninstallFiles |
| 67 |
# Under the install directory remove all the empty directories |
| 68 |
# If some files remain then |
| 69 |
|
| 70 |
removeUninstallFiles() { |
| 71 |
# remove the uninstall scripts files. |
| 72 |
rm -rf @FB_MISCDIR@/scripts |
| 73 |
rm -f @FB_MISCDIR@/manifest.txt |
| 74 |
rm -f @FB_SBINDIR@/fbUninstall.sh |
| 75 |
rm -f @FB_LIBDIR@/libfbembed.sl |
| 76 |
rm -f @FB_LIBDIR@/libfbclient.sl |
| 77 |
} |
| 78 |
|
| 79 |
|
| 80 |
#------------------------------------------------------------------------ |
| 81 |
# removeEmptyDirs |
| 82 |
# Under the install directory remove all the empty directories |
| 83 |
# If some files remain then |
| 84 |
# This routing loops, since deleting a directory possibly makes |
| 85 |
# the parent empty as well |
| 86 |
|
| 87 |
removeEmptyDirs() { |
| 88 |
|
| 89 |
#rm -fr $FBRootDir |
| 90 |
|
| 91 |
} |
| 92 |
|
| 93 |
|
| 94 |
removeInstalledFiles # Remove installed files |
| 95 |
removeUninstallFiles # Remove the 'uninstall' utility files |
| 96 |
removeEmptyDirs # Remove empty directories |