代码拉取完成,页面将自动刷新
#!/bin/sh
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 20110224-1507-MCT - Needed quotes around a string compare.
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo " Checking for updates ..."
mkdir update_check
cd update_check
SYSNAME=`uname`
if [ `expr "$SYSNAME" : "Darwin"` = 6 ]; then
curl -O -s --connect-timeout 4 --retry 1 http://firmware-mod-kit.googlecode.com/svn/trunk/firmware_mod_kit_version.txt
else
wget --quiet --timeout=4 --tries=1 http://firmware-mod-kit.googlecode.com/svn/trunk/firmware_mod_kit_version.txt
fi
cd ..
if [ ! -f "update_check/firmware_mod_kit_version.txt" ]; then
echo " ! WARNING: Could not check for update. No connectivity or server down?"
rm -rf update_check
exit 1
fi
NEW_VERSION=`cat update_check/firmware_mod_kit_version.txt`
CUR_VERSION=`cat firmware_mod_kit_version.txt`
if [ "$NEW_VERSION" != "$CUR_VERSION" ]; then
echo " !!! There is a newer version available: $NEW_VERSION"
echo " You are currently using $CUR_VERSION"
else
echo " You have the latest version of this kit."
fi
rm -rf update_check
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。