Commit 117bcabe authored by Marco Mariani's avatar Marco Mariani

remove and create $ZIMBRA_HOME instead of /opt/zimbra

parent e25f31d4
...@@ -36,7 +36,7 @@ usage() { ...@@ -36,7 +36,7 @@ usage() {
echo "" echo ""
echo "Usage: "`basename $0`" [-b] -c [-p] [-s]" >&2 echo "Usage: "`basename $0`" [-b] -c [-p] [-s]" >&2
echo "-b: Use beta software versions" echo "-b: Use beta software versions"
echo "-c: Remove contents of /opt/zimbra (clean)" echo "-c: Remove contents of ${ZIMBRA_HOME} (clean)"
echo "-p: Use private CPAN mirror" echo "-p: Use private CPAN mirror"
echo "-s: Re-sync source before building" echo "-s: Re-sync source before building"
exit 2; exit 2;
...@@ -156,7 +156,7 @@ RELEASE=${RELEASE##*/} ...@@ -156,7 +156,7 @@ RELEASE=${RELEASE##*/}
if [ x$CLEAN = x"no" ]; then if [ x$CLEAN = x"no" ]; then
echo "WARNING: You must supply the clean option -c" echo "WARNING: You must supply the clean option -c"
echo "WARNING: This will completely remove the contents of /opt/zimbra from the system" echo "WARNING: This will completely remove the contents of ${ZIMBRA_HOME} from the system"
exit 1; exit 1;
fi fi
...@@ -176,7 +176,7 @@ if [ x$PLAT = "x" ]; then ...@@ -176,7 +176,7 @@ if [ x$PLAT = "x" ]; then
fi fi
if [ x$OVERRIDE = x"no" ]; then if [ x$OVERRIDE = x"no" ]; then
askYN "Proceeding will remove /opt/zimbra. Do you wish to continue?: " "N" askYN "Proceeding will remove ${ZIMBRA_HOME}. Do you wish to continue?: " "N"
if [ $response = "no" ]; then if [ $response = "no" ]; then
echo "Exiting" echo "Exiting"
exit 1; exit 1;
...@@ -299,11 +299,11 @@ if [[ $PLAT != "MACOSX"* ]]; then ...@@ -299,11 +299,11 @@ if [[ $PLAT != "MACOSX"* ]]; then
fi fi
if [ x"$ZIMBRA" = x"no" ]; then if [ x"$ZIMBRA" = x"no" ]; then
echo "Cleaning contents of /opt/zimbra" echo "Cleaning contents of ${ZIMBRA_HOME}"
if [ -d "/opt/zimbra" ]; then if [ -d "${ZIMBRA_HOME}" ]; then
rm -rf /opt/zimbra/* 2>/dev/null rm -rf ${ZIMBRA_HOME}/* 2>/dev/null
rm -rf /opt/zimbra/.* 2>/dev/null rm -rf ${ZIMBRA_HOME}/.* 2>/dev/null
mkdir -p /opt/zimbra mkdir -p ${ZIMBRA_HOME}
fi fi
else else
if [ -x "/home/build/scripts/setup-build.sh" ]; then if [ -x "/home/build/scripts/setup-build.sh" ]; then
...@@ -314,14 +314,14 @@ else ...@@ -314,14 +314,14 @@ else
fi fi
fi fi
touch /opt/zimbra/blah 2>/dev/null touch ${ZIMBRA_HOME}/blah 2>/dev/null
RC=$? RC=$?
if [ $RC -eq 1 ]; then if [ $RC -eq 1 ]; then
echo "Error: Unable to write to /opt/zimbra" echo "Error: Unable to write to ${ZIMBRA_HOME}"
exit 1; exit 1;
else else
rm -f /opt/zimbra/blah rm -f ${ZIMBRA_HOME}/blah
fi fi
if [ x$PUBLIC = x"yes" ]; then if [ x$PUBLIC = x"yes" ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment