Remove zip file

This commit is contained in:
Bob Mottram 2016-09-28 17:14:03 +01:00
parent f01b5f566e
commit ccb2cbeec7
1 changed files with 12 additions and 2 deletions

View File

@ -140,7 +140,12 @@ function upgrade_gogs {
exit 37823
fi
cp -r $INSTALL_DIR/gogs /home/$GOGS_USERNAME
rm linux_${CURR_ARCH}.tar.gz
if [ -f linux_${CURR_ARCH}.tar.gz ]; then
rm linux_${CURR_ARCH}.tar.gz
fi
if [ -f linux_${CURR_ARCH}.zip ]; then
rm linux_${CURR_ARCH}.zip
fi
sed -i "s|Gogs version.*|Gogs version:$GOGS_VERSION|g" $COMPLETION_FILE
systemctl restart gogs
@ -366,7 +371,12 @@ function install_gogs {
exit 37823
fi
cp -r $INSTALL_DIR/gogs /home/$GOGS_USERNAME
rm linux_${CURR_ARCH}.tar.gz
if [ -f linux_${CURR_ARCH}.tar.gz ]; then
rm linux_${CURR_ARCH}.tar.gz
fi
if [ -f linux_${CURR_ARCH}.zip ]; then
linux_${CURR_ARCH}.zip
fi
if [ ! -f /home/$GOGS_USERNAME/gogs ]; then
echo 'Gogs binary not installed'