Commit 4d6a63ca authored by sokai's avatar sokai

small upgrade improvement

parent 1a42c470
......@@ -153,8 +153,8 @@ upgrade() {
wget -q -O ${SCRIPT} $UPGRADEURL && chmod +x ${SCRIPT}
if [ -f ${SCRIPT} ]; then
VERSION=$(grep 'SCRIPTVERSION=' ${SCRIPT}| cut -f2 -d'='|sed 's/ /%20/g'|sed "s/'//g")
SUCCESS="new version (${VERSION}) installed at ${SCRIPT} ((${SCRIPT} upgrade))"
VERSION=$(grep 'SCRIPTVERSION=' ${SCRIPT} -m 1 | cut -f2 -d'='|sed 's/ /%20/g'|sed "s/'//g")
SUCCESS="new version (${VERSION}) installed at ${SCRIPT} (${SCRIPT} upgrade)"
echo ${SUCCESS}
logger -t ${SCRIPTNAME} ${SUCCESS}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment