summaryrefslogtreecommitdiff
path: root/setup_native/scripts
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-10-27 11:09:46 +0000
committerRüdiger Timm <rt@openoffice.org>2006-10-27 11:09:46 +0000
commit04e58509ff476d213609858f9350b30895db5cfc (patch)
tree7eed45e5a43c97384eb043e71cb6f1e828fbdd9e /setup_native/scripts
parent07a8b9969fd64124e8c88bc391af09c36206d867 (diff)
INTEGRATION: CWS native68 (1.1.2); FILE ADDED
2006/10/12 10:19:46 is 1.1.2.1: #i69940# installing extension during office installation
Diffstat (limited to 'setup_native/scripts')
-rw-r--r--setup_native/scripts/deregister_extensions78
1 files changed, 78 insertions, 0 deletions
diff --git a/setup_native/scripts/deregister_extensions b/setup_native/scripts/deregister_extensions
new file mode 100644
index 000000000000..4a8f91de41f0
--- /dev/null
+++ b/setup_native/scripts/deregister_extensions
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+USAGE="Usage: $0"
+
+SCRIPTNAME=`basename "$0"`
+PROGRAMDIR=`dirname "$0"`
+OFFICEDIR="$PROGRAMDIR/.."
+EXTENSIONDIR=$OFFICEDIR/share/extension/install
+UNOPKG=$PROGRAMDIR/unopkg
+
+help()
+{
+ echo
+ echo "Uninstallation script for office extensions located in <office>/share/extension/install"
+ echo
+ echo "This uninstallation script can be executed after successful installation of packages."
+ echo "Please execute this script, before uninstallation of packages."
+ echo "Usage: $0"
+ echo "No parameter required."
+ echo
+}
+
+#
+# This script is only for root installations
+# (How about installations done with user privileges?)
+#
+
+# if [ $UID -ne 0 ]
+# then
+# printf "\nThis script is for installation only wiht administrative rights only\n"
+# help
+# exit 2
+# fi
+
+#
+# Checking existence of unopkg in program directory
+#
+
+if [ ! -f "$UNOPKG" ]; then
+ echo "Error: File $UNOPKG does not exist"
+ exit 1
+fi
+
+if [ ! -x "$UNOPKG" ]; then
+ echo "Error: File $UNOPKG is not an executable file"
+ exit 1
+fi
+
+#
+# Collecting all files located in share/install/extensions
+#
+
+FILELIST=`find $EXTENSIONDIR -type f -name "*.oxt" -print`
+
+if [ -z "$FILELIST" ]
+then
+ printf "\n$0: No extensions found in $EXTENSIONDIR\n"
+ exit 2
+fi
+
+echo
+echo "Uninstalling:"
+for i in $FILELIST; do
+ echo `basename $i`
+done
+echo
+
+for i in $FILELIST; do
+ COMMAND="$UNOPKG remove --shared `basename $i`"
+ echo $COMMAND
+ $COMMAND
+done
+
+echo
+echo "Uninstallation done ..."
+echo
+
+exit 0