forked from Wavyzz/dolibarr
Prepare cleaning tools for release.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user