You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/11/29 07:53:54 UTC

[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1020: [IMPROVEMENT] Improve celeborn script logic

waitinfuture commented on code in PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020#discussion_r1034403608


##########
sbin/celeborn-daemon.sh:
##########
@@ -74,36 +74,34 @@ celeborn_rotate_log ()
     log=$1;
     num=5;
     if [ -n "$2" ]; then
-	num=$2
+	    num=$2
     fi
     if [ -f "$log" ]; then # rotate logs
-	while [ $num -gt 1 ]; do
-	    prev=`expr $num - 1`
-	    [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
-	    num=$prev
-	done
-	mv "$log" "$log.$num";
+	    while [ $num -gt 1 ]; do
+	      prev=`expr $num - 1`
+	      [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+	      num=$prev

Review Comment:
   Seems there are tabs in the beginning of the line, we can replace with whitespace



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org