Remove any existing installation

This commit is contained in:
Bob Mottram 2016-09-28 17:41:11 +01:00
parent 1c619cc5ea
commit dbd7239ecf
1 changed files with 8 additions and 2 deletions

View File

@ -120,6 +120,9 @@ function upgrade_gogs {
mkdir -p ${INSTALL_DIR}
fi
cd ${INSTALL_DIR}
if [ -d $INSTALL_DIR/gogs ]; then
rm -rf $INSTALL_DIR/gogs
fi
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
if [ ! -f $GOGS_FILE ]; then
wget ${GOGS_BIN}
@ -134,7 +137,7 @@ function upgrade_gogs {
exit 37836
else
apt-get -y install unzip
unzip -A ${GOGS_FILE}
unzip ${GOGS_FILE}
fi
else
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
@ -351,6 +354,9 @@ function install_gogs {
mkdir -p ${INSTALL_DIR}
fi
cd ${INSTALL_DIR}
if [ -d $INSTALL_DIR/gogs ]; then
rm -rf $INSTALL_DIR/gogs
fi
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
if [ ! -f ${GOGS_FILE} ]; then
wget ${GOGS_BIN}
@ -363,7 +369,7 @@ function install_gogs {
exit 37836
else
apt-get -y install unzip
unzip -A ${GOGS_FILE}
unzip ${GOGS_FILE}
fi
else
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}