From dbd7239ecf487a5f4058b741daae53f5f671576e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Sep 2016 17:41:11 +0100 Subject: [PATCH] Remove any existing installation --- src/freedombone-app-gogs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 3c31ed5f..3c2854e1 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -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}