Remove directory contents if it exists

This commit is contained in:
Bob Mottram 2017-02-07 15:52:29 +00:00
parent 8960b0851a
commit 82d353e9d0
1 changed files with 3 additions and 0 deletions

View File

@ -531,6 +531,9 @@ function install_identity_server {
if [ ! -d $INSTALL_DIR/sydent ]; then
mkdir -p $INSTALL_DIR/sydent
fi
if [ -d $INSTALL_DIR/sydent ]; then
rm -rf $INSTALL_DIR/sydent/*
fi
pip install --upgrade --process-dependency-links . -b $INSTALL_DIR/sydent
if [ ! "$?" = "0" ]; then
echo $'Failed to install matrix identity server'