From: Martti Rannanjärvi Date: Tue, 3 Aug 2021 07:56:08 +0000 (+0300) Subject: util: dovecot-sysreport - Use only spaces for indentation X-Git-Tag: 2.3.16~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd85976845d9240a6abbd267834dd43969b84fbc;p=thirdparty%2Fdovecot%2Fcore.git util: dovecot-sysreport - Use only spaces for indentation Stop mixing tabs and spaces. --- diff --git a/src/util/dovecot-sysreport b/src/util/dovecot-sysreport index 1cfe8e88e1..f7073555c5 100755 --- a/src/util/dovecot-sysreport +++ b/src/util/dovecot-sysreport @@ -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 ;;