[Groonga-commit] groonga/groonga at 455aa8c [master] Use 4 spaces indent for shell script

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Aug 21 11:36:04 JST 2013


Kouhei Sutou	2013-08-21 11:36:04 +0900 (Wed, 21 Aug 2013)

  New Revision: 455aa8ceb483405ea6f454670a24d5de31aaa9b3
  https://github.com/groonga/groonga/commit/455aa8ceb483405ea6f454670a24d5de31aaa9b3

  Message:
    Use 4 spaces indent for shell script
    
    Because sh-mode in Emacs uses 4 spaces indent by default.

  Modified files:
    data/scripts/groonga-httpd-restart

  Modified: data/scripts/groonga-httpd-restart (+15 -15)
===================================================================
--- data/scripts/groonga-httpd-restart    2013-08-21 11:30:26 +0900 (02616f4)
+++ data/scripts/groonga-httpd-restart    2013-08-21 11:36:04 +0900 (a8301bd)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# -*- indent-tabs-mode: nil -*-
+# -*- indent-tabs-mode: nil; sh-indentation: 4 -*-
 
 GROONGA_HTTPD=groonga-httpd
 PIDFILE=/var/run/groonga/${GROONGA_HTTPD}.pid
@@ -20,25 +20,25 @@ elif [ -f /etc/init.d/functions ]; then
 fi
 
 wait_until_file_is_created () {
-        timeout $STATUS_TIMEOUT tail -F $1 --quiet 2> /dev/null | read 2> /dev/null
+    timeout $STATUS_TIMEOUT tail -F $1 --quiet 2> /dev/null | read 2> /dev/null
 }
 
 wait_until_process_is_finished () {
-        timeout $STATUS_TIMEOUT tail -F /dev/null --pid=$1
+    timeout $STATUS_TIMEOUT tail -F /dev/null --pid=$1
 }
 
 if [ "$1" = "try-restart" ]; then
-        if [ ! -f "$PIDFILE" ]; then
-                exit 0
-        fi
+    if [ ! -f "$PIDFILE" ]; then
+        exit 0
+    fi
 fi
 
 killproc -p $PIDFILE ${GROONGA_HTTPD} -USR2
 
 wait_until_file_is_created $OLD_PIDFILE
 if [ ! -f "$OLD_PIDFILE" ]; then
-        echo "Failed to start new groonga-httpd master."
-        exit 1
+    echo "Failed to start new groonga-httpd master."
+    exit 1
 fi
 
 OLD_PID=`cat $OLD_PIDFILE`
@@ -48,21 +48,21 @@ kill -WINCH `cat $OLD_PIDFILE`
 
 wait_until_file_is_created $PIDFILE
 if [ ! -f "$PIDFILE" ]; then
-        echo "Failed to switch worker process."
-        exit 2
+    echo "Failed to switch worker process."
+    exit 2
 fi
 PID=`cat $PIDFILE`
 
 OLD_WORKER_PROCESS=`pgrep -P $OLD_PID | grep -v $PID`
 for pid in $OLD_WORKER_PROCESS; do
-        wait_until_process_is_finished $pid
+    wait_until_process_is_finished $pid
 done
 OLD_WORKER_PROCESS=`pgrep -P $OLD_PID | grep -v $PID`
 if [ -n "$OLD_WORKER_PROCESS" ]; then
-        echo "Failed to stop old groonga-httpd worker process."
-        killproc -p $PIDFILE ${GROONGA_HTTPD} -QUIT
-        echo "Rollback to old groonga-httpd master."
-        exit 2
+    echo "Failed to stop old groonga-httpd worker process."
+    killproc -p $PIDFILE ${GROONGA_HTTPD} -QUIT
+    echo "Rollback to old groonga-httpd master."
+    exit 2
 fi
 
 # Stop old master process.
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index