forked from Wavyzz/dolibarr
Prepare cleaning tools for release.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
# Syntax
|
# Syntax
|
||||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Detect and fix files ending with bad ending chars (must be LF)"
|
||||||
echo "Usage: fixdosfiles.sh [list|fix]"
|
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
# Syntax
|
# Syntax
|
||||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Detect duplicate translation keys inside a file (there is no cross file check)."
|
||||||
echo "Usage: detectduplicatelangkey.sh (list|fix)"
|
echo "Usage: detectduplicatelangkey.sh (list|fix)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -9,17 +9,19 @@
|
|||||||
# Syntax
|
# Syntax
|
||||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Find exact duplicated lines into file (not cross file checking)"
|
||||||
echo "Usage: deduplicatefilelinesrecursively.sh [list|fix]"
|
echo "Usage: deduplicatefilelinesrecursively.sh [list|fix]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# To detect
|
# To detect
|
||||||
if [ "x$1" = "xlist" ]
|
if [ "x$1" = "xlist" ]
|
||||||
then
|
then
|
||||||
for file in `find . -type f -name *.lang`
|
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
||||||
do
|
do
|
||||||
if [ `sort "$file" | uniq -d | wc -l` -gt 0 ]
|
if [ `sort "$file" | grep -v '^$' | uniq -d | wc -l` -gt 0 ]
|
||||||
then
|
then
|
||||||
echo "$file"
|
echo "***** $file"
|
||||||
|
sort "$file" | grep -v '^$' | uniq -d
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -27,7 +29,7 @@ fi
|
|||||||
# To fix
|
# To fix
|
||||||
if [ "x$1" = "xfix" ]
|
if [ "x$1" = "xfix" ]
|
||||||
then
|
then
|
||||||
for file in `find . -type f -name *.lang`
|
for file in `find htdocs/langs/en_US -type f -name *.lang`
|
||||||
do
|
do
|
||||||
awk -i inplace ' !x[$0]++' "$file"
|
awk -i inplace ' !x[$0]++' "$file"
|
||||||
done;
|
done;
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
# Syntax
|
# Syntax
|
||||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Fix permissions of files"
|
||||||
echo "Usage: fixperms.sh (list|fix)"
|
echo "Usage: fixperms.sh (list|fix)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
# Syntax
|
# Syntax
|
||||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
then
|
then
|
||||||
|
echo "Detect and fix bad UTF8 encoded files (UTF8 must not use BOM char)"
|
||||||
echo "Usage: fixutf8bomfiles.sh (list|fix) [addincludes]"
|
echo "Usage: fixutf8bomfiles.sh (list|fix) [addincludes]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user