2
0
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:
MDW
2024-02-10 17:26:34 +01:00
committed by GitHub
parent ad759c4826
commit 16f723f0ba
7 changed files with 205 additions and 93 deletions

View File

@@ -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