From c187c36c510cff5bf0aab138e1e9bf0c8cd47288 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 24 Jul 2024 01:07:56 +0800 Subject: [PATCH] Update update_dev.sh --- scripts/update_dev.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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