summaryrefslogtreecommitdiff
path: root/install-kolab.sh
diff options
context:
space:
mode:
authorSascha Wilde <wilde@intevation.de>2008-07-04 16:02:13 (GMT)
committerSascha Wilde <wilde@intevation.de>2008-07-04 16:02:13 (GMT)
commit6f44de7b1fac04c5980c021cbf6b8d3dffe01475 (patch)
treeffb13f120f57f653f5a369700ba74e38835d63b5 /install-kolab.sh
parent49e8b55a1c6112757cec8edfeff3cb41d7730d0a (diff)
downloadserver-6f44de7b1fac04c5980c021cbf6b8d3dffe01475.tar.gz
Added new option `-x' to deselect packages from installation.
Diffstat (limited to 'install-kolab.sh')
-rwxr-xr-xinstall-kolab.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/install-kolab.sh b/install-kolab.sh
index 7c501cd..a5e1348 100755
--- a/install-kolab.sh
+++ b/install-kolab.sh
@@ -22,6 +22,7 @@ INSTALL=""
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 @@ usage() {
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 @@ populate_workdir() {
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 @@ while getopts hcBXE:V:p:I:u:t:O: ARGS; do
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 name (USER): $USER"
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 @@ if [ -n "$DIR" ]; then
-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