diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index f0a77a932..7c4d2ebd6 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -10,14 +10,16 @@ _os=`uname` echo "use system: ${_os}" if [ "$EUID" -ne 0 ] - then echo "Please run as root!" - exit + then echo "Please run as root!" + exit fi if [ ${_os} != "Darwin" ] && [ ! -d /www/server/mdserver-web/logs ]; then mkdir -p /www/server/mdserver-web/logs fi +LOG_FILE=/var/log/mw-update.log + { if [ ${_os} == "Darwin" ]; then @@ -122,4 +124,4 @@ endTime=`date +%s` ((outTime=($endTime-$startTime)/60)) echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" -} 1> >(tee mw-update.log) 2>&1 \ No newline at end of file +} 1> >(tee $LOG_FILE) 2>&1 \ No newline at end of file