2
0
forked from Wavyzz/dolibarr

Prepare cleaning tools for release.

This commit is contained in:
Laurent Destailleur
2015-03-13 16:20:42 +01:00
parent b47e16fbe9
commit 5cc48c7c78
5 changed files with 10 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Detect and fix files ending with bad ending chars (must be LF)"
echo "Usage: fixdosfiles.sh [list|fix]"
fi

View File

@@ -7,6 +7,7 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Detect duplicate translation keys inside a file (there is no cross file check)."
echo "Usage: detectduplicatelangkey.sh (list|fix)"
fi

View File

@@ -9,17 +9,19 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Find exact duplicated lines into file (not cross file checking)"
echo "Usage: deduplicatefilelinesrecursively.sh [list|fix]"
fi
# To detect
if [ "x$1" = "xlist" ]
then
for file in `find . -type f -name *.lang`
for file in `find htdocs/langs/en_US -type f -name *.lang`
do
if [ `sort "$file" | uniq -d | wc -l` -gt 0 ]
if [ `sort "$file" | grep -v '^$' | uniq -d | wc -l` -gt 0 ]
then
echo "$file"
echo "***** $file"
sort "$file" | grep -v '^$' | uniq -d
fi
done
fi
@@ -27,7 +29,7 @@ fi
# To fix
if [ "x$1" = "xfix" ]
then
for file in `find . -type f -name *.lang`
for file in `find htdocs/langs/en_US -type f -name *.lang`
do
awk -i inplace ' !x[$0]++' "$file"
done;

View File

@@ -10,6 +10,7 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Fix permissions of files"
echo "Usage: fixperms.sh (list|fix)"
fi

View File

@@ -12,6 +12,7 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
echo "Detect and fix bad UTF8 encoded files (UTF8 must not use BOM char)"
echo "Usage: fixutf8bomfiles.sh (list|fix) [addincludes]"
fi