wilde: server install-kolab.sh,1.35,1.36

cvs at kolab.org cvs at kolab.org
Fri Jul 4 18:02:15 CEST 2008


Author: wilde

Update of /kolabrepository/server
In directory doto:/tmp/cvs-serv15665

Modified Files:
	install-kolab.sh 
Log Message:
Added new option `-x' to deselect packages from installation.


Index: install-kolab.sh
===================================================================
RCS file: /kolabrepository/server/install-kolab.sh,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- install-kolab.sh	4 Jul 2008 15:59:11 -0000	1.35
+++ install-kolab.sh	4 Jul 2008 16:02:13 -0000	1.36
@@ -22,6 +22,7 @@
 
 PACKAGES="openpkg-tools openldap postfix kolabd kolab-filter kolab-freebusy kolab-webadmin fbview-kronolith horde-kolab-client"
 DEFINE="-D openldap::with_pth=no -D sasl::with_ldap -D sasl::with_login -D sasl::with_ntlm -D postfix::with_sasl -D postfix::with_ssl -D postfix::with_ldap -D imapd::with_kolab_nocaps"
+EXCLUDEPKGS=""
 
 #Flags
 FLAG_BASE=""
@@ -44,6 +45,8 @@
     echo
     echo "  -V VERSION (alternate version;             default is $KOLAB_VERSION)"
     echo
+    echo "  -x PACKAGE (exclude PACKAGE from installation, can be given more than once)"
+    echo
     echo "  -X         (generate 00INDEX.rdf for packages in the current directory"
     echo "              using the OpenPKG installation in /\$PREFIX)"
     echo
@@ -80,7 +83,12 @@
   find "$SRCDIR" -mindepth 1 -maxdepth 1 -name "*.rpm" \! -name "openpkg-2*.rpm" -exec ln -sf '{}' "$WORKDIR" \;
 }
 
-while getopts hcBXE:V:p:I:u:t:O: ARGS; do
+remove_from_list() {
+# Return list with all elements which ar in $1 and $2 removed.
+  echo "$1" "$2" | tr " " "\n" | sort | uniq -u | tr "\n" " "
+}
+
+while getopts hcBXE:V:p:I:u:t:O:x: ARGS; do
     case $ARGS in
         h) # Display help
             usage
@@ -110,6 +118,9 @@
         c) # User wants to erase the openpkg environment
             FLAG_CLEAN="Yes"
             ;;
+        x) # exclude from installation
+            EXCLUDEPKGS="$EXCLUDEPKGS $OPTARG"
+            ;;
         X) # User wants to collect a set of packages into 00INDEX.rdf
             FLAG_INDEX="Yes"
             ;;
@@ -181,6 +192,7 @@
 echo "Kolab user base UID (KID):          $KID"
 echo "Kolab restricted UID (KID):         $R_KID"
 echo "Kolab non-priviledged UID (KID):    $N_KID"
+echo "Exlude following Kolab packages:    $EXCLUDEPKGS"
 echo
 
 if [ -z "$INSTALL" ]; then
@@ -274,6 +286,9 @@
             -Dkolab-webadmin::kolab_version=$KOLAB_VERSION
         "
     fi
+
+    PACKAGES=`remove_from_list "$EXCLUDEPKGS" "$PACKAGES"`
+
     find "$DIR" -mindepth 1 -maxdepth 1 -name "*.$PLATTAG.rpm" -exec ln -sf '{}' "$PREFIX/RPM/PKG/" \;
     echo "----------- SETUP COMPLETED -----------"
     echo





More information about the commits mailing list