forked from Wavyzz/dolibarr
Qual Language scripts fixed/updated (#28101)
* Qual: Fix/extend language scripts, integrate in pre-commit Updated scripts to comply with shellscript. Integrated one in pre-commit that seems useful. * Qual: Find duplicate lang keys * Add line numbers (to allow annotation) * Fix fixaltlanguages.sh and add to pre-commit * Make historical language checks 'manual' in 'pre-commit'
This commit is contained in:
@@ -6,23 +6,22 @@
|
||||
#------------------------------------------------------
|
||||
# Usage: fixnotabfiles.sh [list|fix]
|
||||
#------------------------------------------------------
|
||||
# shellcheck disable=2166,2268
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
if [ "$1" != "list" ] && [ "$1" != "fix" ]
|
||||
then
|
||||
echo "Detect .sh and .spec files that does not contains any tab inside"
|
||||
echo "Detect .sh and .spec files that does not contain any tab"
|
||||
echo "Usage: fixnotabfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
# List/Detect files
|
||||
if [ "$1" = "list" ]
|
||||
then
|
||||
find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
|
||||
find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -L -P '\t' {} \;
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
# Fix/convert files
|
||||
if [ "$1" = "fix" ]
|
||||
then
|
||||
echo Feature not implemented. Please fix files manually.
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user