]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
util: dovecot-sysreport - Use only spaces for indentation
authorMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Tue, 3 Aug 2021 07:56:08 +0000 (10:56 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 3 Aug 2021 09:05:55 +0000 (12:05 +0300)
Stop mixing tabs and spaces.

src/util/dovecot-sysreport

index 1cfe8e88e1523d2144e85c21c86ea7706ca83103..f7073555c5d02b1ca3dd2c55bc54bd3b715fc7e5 100755 (executable)
@@ -53,36 +53,36 @@ while (( "$#" )); do
       fi
 
       while [[ "$#" -ge 2 ]]; do
-       # see if binary parameter is specified
-       binary=$2
-       if ! [ -r "$binary" ]; then
-         echo "$binary not readable"
-         exit 1
-       fi
-       binary_info=$(file "$binary")
-       if echo "$binary_info" | grep "core file.*execfn: '" >/dev/null; then
-         # no binary specified - detect it
-         binary=$(echo "$binary_info" | sed "s;^.*execfn: '\([^\']\+\)'.*$;\1;")
-         if ! [ -r "$binary" ]; then
-           echo "Detected binary path '$binary' from core file, but it is not readable"
-           exit 1
-         fi
-         echo "Core file was detected to be generated by $binary"
-       else
-         shift
-       fi
-
-       core=$2
-       shift
-       if ! [ -s "$core" ]; then
-         echo "$core not found or it is empty"
-         exit 1
-       fi
-
-       echo "gathering core file dependencies..."
-       core_files=$((echo "info shared"; sleep 1) | $gdb $binary $core | grep '^0x.*/' | sed 's,^[^/]*,,')
-       copy_files="$copy_files $binary $core_files"
-       cp $core $SRTEMP
+        # see if binary parameter is specified
+        binary=$2
+        if ! [ -r "$binary" ]; then
+          echo "$binary not readable"
+          exit 1
+        fi
+        binary_info=$(file "$binary")
+        if echo "$binary_info" | grep "core file.*execfn: '" >/dev/null; then
+          # no binary specified - detect it
+          binary=$(echo "$binary_info" | sed "s;^.*execfn: '\([^\']\+\)'.*$;\1;")
+          if ! [ -r "$binary" ]; then
+            echo "Detected binary path '$binary' from core file, but it is not readable"
+            exit 1
+          fi
+          echo "Core file was detected to be generated by $binary"
+        else
+          shift
+        fi
+
+        core=$2
+        shift
+        if ! [ -s "$core" ]; then
+          echo "$core not found or it is empty"
+          exit 1
+        fi
+
+        echo "gathering core file dependencies..."
+        core_files=$((echo "info shared"; sleep 1) | $gdb $binary $core | grep '^0x.*/' | sed 's,^[^/]*,,')
+        copy_files="$copy_files $binary $core_files"
+        cp $core $SRTEMP
       done
       shift
       ;;