2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/dev/tools/fixnotabfiles.sh
MDW c885c6917e Qual: Ignore most shellcheck annotations, fix some (#27452)
# Qual: Ignore most shellcheck annotations, fix some

Most shellcheck annotations are ignored - this is to make sure that ci
can work for existing scripts.

Some fixes were applied.

pre-commit script was beautyfied by temporarily suppressing the IFS= expression on 2 lines.
2024-01-12 21:03:08 +01:00

29 lines
753 B
Bash
Executable File

#!/bin/sh
#------------------------------------------------------
# Detect files that does not contains any tab inside
#
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# Usage: fixnotabfiles.sh [list|fix]
#------------------------------------------------------
# shellcheck disable=2166,2268
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Detect .sh and .spec files that does not contains any tab inside"
echo "Usage: fixnotabfiles.sh [list|fix]"
fi
# To detec
if [ "x$1" = "xlist" ]
then
find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
fi
# To convert
if [ "x$1" = "xfix" ]
then
echo Feature not implemented. Please fix files manually.
fi