lower case

This commit is contained in:
Bob Mottram 2016-10-02 20:43:39 +01:00
parent aed179356f
commit 175a14276f
1 changed files with 6 additions and 6 deletions

View File

@ -183,11 +183,11 @@ function reconfigure_gogs {
} }
function upgrade_gogs { function upgrade_gogs {
if ! grep -q "Gogs version:" $COMPLETION_FILE; then if ! grep -q "gogs version:" $COMPLETION_FILE; then
return return
fi fi
CURR_GOGS_VERSION=$(cat $COMPLETION_FILE | grep "Gogs version" | head -n 1 | awk -F ':' '{print $2}') CURR_GOGS_VERSION=$(cat $COMPLETION_FILE | grep "gogs version" | head -n 1 | awk -F ':' '{print $2}')
if [[ "$CURR_GOGS_VERSION" == "$GOGS_VERSION" ]]; then if [[ "$CURR_GOGS_VERSION" == "$GOGS_VERSION" ]]; then
return return
fi fi
@ -229,7 +229,7 @@ function upgrade_gogs {
rm ${GOGS_FILE} rm ${GOGS_FILE}
fi fi
sed -i "s|Gogs version.*|Gogs version:$GOGS_VERSION|g" $COMPLETION_FILE sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" $COMPLETION_FILE
systemctl restart gogs systemctl restart gogs
} }
@ -755,10 +755,10 @@ function install_gogs {
function_check configure_firewall_for_git function_check configure_firewall_for_git
configure_firewall_for_git configure_firewall_for_git
if ! grep -q "Gogs version:" $COMPLETION_FILE; then if ! grep -q "gogs version:" $COMPLETION_FILE; then
echo "Gogs version:$GOGS_VERSION" >> $COMPLETION_FILE echo "gogs version:$GOGS_VERSION" >> $COMPLETION_FILE
else else
sed -i "s|Gogs version.*|Gogs version:$GOGS_VERSION|g" $COMPLETION_FILE sed -i "s|gogs version.*|gogs version:$GOGS_VERSION|g" $COMPLETION_FILE
fi fi
} }