Skip to content
Snippets Groups Projects
Commit 3e8830eb authored by Bob Mottram's avatar Bob Mottram
Browse files

Try zip if tar.gz is not available

parent b8205d88
No related branches found
No related tags found
No related merge requests found
......@@ -125,9 +125,16 @@ function upgrade_gogs {
fi
wget ${GOGS_BIN}
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
exit 37836
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
else
unzip linux_${CURR_ARCH}.zip
fi
else
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
fi
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
if [ ! -d $INSTALL_DIR/gogs ]; then
exit 37823
fi
......@@ -343,9 +350,16 @@ function install_gogs {
fi
wget ${GOGS_BIN}
if [ ! -f linux_${CURR_ARCH}.tar.gz ]; then
exit 37836
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
else
unzip linux_${CURR_ARCH}.zip
fi
else
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
fi
tar -xzf ${INSTALL_DIR}/linux_${CURR_ARCH}.tar.gz
if [ ! -d $INSTALL_DIR/gogs ]; then
exit 37823
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment