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 {
if ! grep -q "Gogs version:" $COMPLETION_FILE; then
if ! grep -q "gogs version:" $COMPLETION_FILE; then
return
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
return
fi
@ -229,7 +229,7 @@ function upgrade_gogs {
rm ${GOGS_FILE}
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
}
@ -755,10 +755,10 @@ function install_gogs {
function_check configure_firewall_for_git
configure_firewall_for_git
if ! grep -q "Gogs version:" $COMPLETION_FILE; then
echo "Gogs version:$GOGS_VERSION" >> $COMPLETION_FILE
if ! grep -q "gogs version:" $COMPLETION_FILE; then
echo "gogs version:$GOGS_VERSION" >> $COMPLETION_FILE
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
}