Try zip if tar.gz is not available
This commit is contained in:
parent
b8205d8871
commit
3e8830eb2a
|
@ -125,9 +125,16 @@ function upgrade_gogs {
|
||||||
fi
|
fi
|
||||||
wget ${GOGS_BIN}
|
wget ${GOGS_BIN}
|
||||||
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
|
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
|
||||||
|
GOGS_BIN="https://github.com/gogits/gogs/releases/download/v${GOGS_VERSION}/linux_${CURR_ARCH}.zip"
|
||||||
|
wget ${GOGS_BIN}
|
||||||
|
if [ ! -f linux_${CURR_ARCH}.zip ]; then
|
||||||
exit 37836
|
exit 37836
|
||||||
|
else
|
||||||
|
unzip linux_${CURR_ARCH}.zip
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
|
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
|
||||||
|
fi
|
||||||
if [ ! -d $INSTALL_DIR/gogs ]; then
|
if [ ! -d $INSTALL_DIR/gogs ]; then
|
||||||
exit 37823
|
exit 37823
|
||||||
fi
|
fi
|
||||||
|
@ -343,9 +350,16 @@ function install_gogs {
|
||||||
fi
|
fi
|
||||||
wget ${GOGS_BIN}
|
wget ${GOGS_BIN}
|
||||||
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
|
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
|
||||||
|
GOGS_BIN="https://github.com/gogits/gogs/releases/download/v${GOGS_VERSION}/linux_${CURR_ARCH}.zip"
|
||||||
|
wget ${GOGS_BIN}
|
||||||
|
if [ ! -f linux_${CURR_ARCH}.zip ]; then
|
||||||
exit 37836
|
exit 37836
|
||||||
|
else
|
||||||
|
unzip linux_${CURR_ARCH}.zip
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
|
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
|
||||||
|
fi
|
||||||
if [ ! -d $INSTALL_DIR/gogs ]; then
|
if [ ! -d $INSTALL_DIR/gogs ]; then
|
||||||
exit 37823
|
exit 37823
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue