Remove directory contents if it exists

This commit is contained in:
Bob Mottram 2017-02-07 15:48:54 +00:00
parent e7b1951c53
commit 8960b0851a
1 changed files with 4 additions and 0 deletions

View File

@ -597,6 +597,10 @@ function install_home_server {
if [ ! -d $INSTALL_DIR/matrix ]; then
mkdir -p $INSTALL_DIR/matrix
fi
rm -rf /usr/local/lib/python2.7/dist-packages/ldap*
if [ -d $INSTALL_DIR/matrix ]; then
rm -rf $INSTALL_DIR/matrix/*
fi
pip install --upgrade --process-dependency-links . -b $INSTALL_DIR/matrix
if [ ! "$?" = "0" ]; then
echo $'Failed to install matrix home server'