thomas: server install-kolab.sh,1.54.2.9,1.54.2.10

cvs at kolab.org cvs at kolab.org
Thu Dec 17 10:45:08 CET 2009


Author: thomas

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

Modified Files:
      Tag: kolab_2_2_branch
	install-kolab.sh 
Log Message:
Some cleanup in install-kolab.sh, no functional changes


Index: install-kolab.sh
===================================================================
RCS file: /kolabrepository/server/install-kolab.sh,v
retrieving revision 1.54.2.9
retrieving revision 1.54.2.10
diff -u -d -r1.54.2.9 -r1.54.2.10
--- install-kolab.sh	16 Dec 2009 16:30:35 -0000	1.54.2.9
+++ install-kolab.sh	17 Dec 2009 09:45:05 -0000	1.54.2.10
@@ -19,14 +19,12 @@
 USER=""
 PREFIX=""
 
-INSTALL=""
-
 PACKAGES="openpkg-tools openldap postfix kolabd kolab-webadmin kolab-fbview kolab-webclient"
 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=""
+FLAG_BOOTSTRAP=""
 FLAG_ENV=""
 FLAG_CLEAN=""
 
@@ -54,10 +52,10 @@
     echo "  -X         (generate 00INDEX.rdf for packages in the current directory"
     echo "              using the OpenPKG installation in /\$PREFIX)"
     echo
-    echo "  -B         (abort after generating the basic openpkg binary)"
-    echo "  -E         (abort after generating the openpkg environment)"
+    echo "  -B         (abort after generating the binary OpenPKG bootstrap package)"
+    echo "  -E         (abort after generating the OpenPKG environment)"
     echo
-    echo "  -O         (additional build options, used for openpkg bootstraping from source)"
+    echo "  -O         (additional build options, used for OpenPKG bootstraping from source)"
     echo
     echo "  -h         (display this help)"
 }
@@ -134,13 +132,13 @@
         t) # User specified an alternative tag
             TAG="$OPTARG"
             ;;
-        B) # User only wants the basic openpkg package in binary form
-            FLAG_BASE="Yes"
+        B) # User only wants the binary OpenPKG bootstrap package
+            FLAG_BOOTSTRAP="Yes"
             ;;
-        E) # User only wants the basic openpkg environment
+        E) # User only wants the OpenPKG environment
             FLAG_ENV="Yes"
             ;;
-        c) # User wants to erase the openpkg environment
+        c) # User wants to erase the OpenPKG environment
             FLAG_CLEAN="Yes"
             ;;
         x) # exclude from installation
@@ -221,40 +219,37 @@
 echo "Exclude following Kolab packages:   $EXCLUDEPKGS"
 echo
 
-if [ -z "$INSTALL" ]; then
-    # Hm, user wants us to figure out what we should do
-    echo "Received no instructions. Trying to determine required action..."
-    if [ -d "$PREFIX/etc/openpkg" ]; then
-        # Assume an upgrade based on the current directory
-        INSTALL=`pwd`
-        echo "Found an OpenPKG environment. Assuming upgrade..."
+echo "Received no instructions. Trying to determine required action..."
+if [ -d "$PREFIX/etc/openpkg" ]; then
+    # Assume an upgrade based on the current directory
+    INSTALL=`pwd`
+    echo "Found an OpenPKG environment. Assuming upgrade..."
+else
+    INSTALLER=`find . $FIND1 -name "openpkg-*.src.sh" -print`
+    BINARY=`find . $FIND1 -name "openpkg-*.sh" \! -name "openpkg-*.src.sh" -print`
+    if [ -z "$INSTALLER" ]; then
+        # No install script? Determine if there is a binary script
+        if [ -z "$BINARY" ]; then
+            echo "Sorry there is no OpenPKG installation script in the current directory!"
+            usage
+            exit 0
+        else
+            # Looks like we only have a binary. Hope that it matches the plattform and install it
+            INSTALL="$BINARY"
+            echo "Found a binary OpenPKG package. This will be installed now."
+        fi
     else
-        INSTALLER=`find . $FIND1 -name "openpkg-*.src.sh" -print`
-        BINARY=`find . $FIND1 -name "openpkg-*.sh" \! -name "openpkg-*.src.sh" -print`
-        if [ -z "$INSTALLER" ]; then
-            # No install script? Determine if there is a binary script
-            if [ -z "$BINARY" ]; then
-                echo "Sorry there is no OpenPKG installation script in the current directory!"
-                usage
-                exit 0
-            else
-                # Looks like we only have a binary. Hope that it matches the plattform and install it
-                INSTALL="$BINARY"
-                echo "Found a binary OpenPKG package. This will be installed now."
-            fi
+        # We have a source package. Check for a matching binary
+        PLATTAG=`shtool_get_plattag`
+        BIN=`basename "$INSTALLER" .src.sh`.$PLATTAG.sh
+        if [ "$BINARY" = "$BIN" ]; then
+            # There is a binary with the correct tag. Install it
+            INSTALL=$BIN
+            echo "Found a binary OpenPKG package with a correct tag. This will be installed now."
         else
-            # We have a source package. Check for a matching binary
-            PLATTAG=`shtool_get_plattag`
-            BIN=`basename "$INSTALLER" .src.sh`.$PLATTAG.sh
-            if [ "$BINARY" = "$BIN" ]; then
-                # There is a binary with the correct tag. Install it
-                INSTALL=$BIN
-                echo "Found a binary OpenPKG package with a correct tag. This will be installed now."
-            else
-                # Install from source
-                INSTALL=$INSTALLER
-                echo "Found a source based OpenPKG installer. Trying to install Kolab from source."
-            fi
+            # Install from source
+            INSTALL=$INSTALLER
+            echo "Found a source based OpenPKG installer. Trying to install Kolab from source."
         fi
     fi
 fi
@@ -290,8 +285,8 @@
         --muid="$KID" --ruid="$R_KID" --nuid="$N_KID" \
         --mgid="$KID" --rgid="$R_KID" --ngid="$N_KID" \
         || exit $?
-    if [ "$FLAG_BASE" ]; then
-        echo "Created basic openpkg binary for you platform!"
+    if [ "$FLAG_BOOTSTRAP" ]; then
+        echo "Created the binary OpenPKG bootstrap package for you platform!"
         exit 0
     fi
 fi
@@ -299,7 +294,7 @@
 if [ -n "$BIN" ]; then
     sh "$BIN" || exit $?
     if [ "$FLAG_ENV" ]; then
-        echo "Created basic openpkg environment!"
+        echo "Created the OpenPKG environment!"
         exit 0
     fi
 fi





More information about the commits mailing list