5 SCRIPTNAME
=`basename "$0"`
6 PROGRAMDIR
=`dirname "$0"`
7 OFFICEDIR
="$PROGRAMDIR/.."
8 EXTENSIONDIR
=$OFFICEDIR/share
/extension
/install
9 UNOPKG
=$PROGRAMDIR/unopkg
14 echo "Uninstallation script for office extensions located in <office>/share/extension/install"
16 echo "This uninstallation script can be executed after successful installation of packages."
17 echo "Please execute this script, before uninstallation of packages."
19 echo "No parameter required."
24 # This script is only for root installations
25 # (How about installations done with user privileges?)
30 # printf "\nThis script is for installation only wiht administrative rights only\n"
36 # Checking existence of unopkg in program directory
39 if [ ! -f "$UNOPKG" ]; then
40 echo "Error: File $UNOPKG does not exist"
44 if [ ! -x "$UNOPKG" ]; then
45 echo "Error: File $UNOPKG is not an executable file"
50 # Collecting all files located in share/install/extensions
53 FILELIST
=`find $EXTENSIONDIR -type f -name "*.oxt" -print`
57 printf "\n$0: No extensions found in $EXTENSIONDIR\n"
63 for i
in $FILELIST; do
68 for i
in $FILELIST; do
69 COMMAND
="$UNOPKG remove --shared `basename $i`"
75 echo "Uninstallation done ..."