Remove any existing installation
This commit is contained in:
parent
1c619cc5ea
commit
dbd7239ecf
|
@ -120,6 +120,9 @@ function upgrade_gogs {
|
||||||
mkdir -p ${INSTALL_DIR}
|
mkdir -p ${INSTALL_DIR}
|
||||||
fi
|
fi
|
||||||
cd ${INSTALL_DIR}
|
cd ${INSTALL_DIR}
|
||||||
|
if [ -d $INSTALL_DIR/gogs ]; then
|
||||||
|
rm -rf $INSTALL_DIR/gogs
|
||||||
|
fi
|
||||||
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
|
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
|
||||||
if [ ! -f $GOGS_FILE ]; then
|
if [ ! -f $GOGS_FILE ]; then
|
||||||
wget ${GOGS_BIN}
|
wget ${GOGS_BIN}
|
||||||
|
@ -134,7 +137,7 @@ function upgrade_gogs {
|
||||||
exit 37836
|
exit 37836
|
||||||
else
|
else
|
||||||
apt-get -y install unzip
|
apt-get -y install unzip
|
||||||
unzip -A ${GOGS_FILE}
|
unzip ${GOGS_FILE}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
|
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
|
||||||
|
@ -351,6 +354,9 @@ function install_gogs {
|
||||||
mkdir -p ${INSTALL_DIR}
|
mkdir -p ${INSTALL_DIR}
|
||||||
fi
|
fi
|
||||||
cd ${INSTALL_DIR}
|
cd ${INSTALL_DIR}
|
||||||
|
if [ -d $INSTALL_DIR/gogs ]; then
|
||||||
|
rm -rf $INSTALL_DIR/gogs
|
||||||
|
fi
|
||||||
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
|
GOGS_FILE=linux_${CURR_ARCH}.tar.gz
|
||||||
if [ ! -f ${GOGS_FILE} ]; then
|
if [ ! -f ${GOGS_FILE} ]; then
|
||||||
wget ${GOGS_BIN}
|
wget ${GOGS_BIN}
|
||||||
|
@ -363,7 +369,7 @@ function install_gogs {
|
||||||
exit 37836
|
exit 37836
|
||||||
else
|
else
|
||||||
apt-get -y install unzip
|
apt-get -y install unzip
|
||||||
unzip -A ${GOGS_FILE}
|
unzip ${GOGS_FILE}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
|
tar -xzf ${INSTALL_DIR}/${GOGS_FILE}
|
||||||
|
|
Loading…
Reference in New Issue