Clean v16
This commit is contained in:
parent
110f7a4736
commit
6ed053e0d0
@ -17,14 +17,14 @@ fi
|
|||||||
# To detec
|
# To detec
|
||||||
if [ "x$1" = "xlist" ]
|
if [ "x$1" = "xlist" ]
|
||||||
then
|
then
|
||||||
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
|
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF
|
||||||
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF
|
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# To convert
|
# To convert
|
||||||
if [ "x$1" = "xfix" ]
|
if [ "x$1" = "xfix" ]
|
||||||
then
|
then
|
||||||
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
|
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep CRLF | awk -F':' '{ print $1 }' `
|
||||||
do
|
do
|
||||||
echo "Fix file $fic"
|
echo "Fix file $fic"
|
||||||
dos2unix "$fic"
|
dos2unix "$fic"
|
||||||
|
|||||||
@ -39,13 +39,14 @@ optimize_image()
|
|||||||
max_input_size=$(expr $max_input_size + $input_file_size)
|
max_input_size=$(expr $max_input_size + $input_file_size)
|
||||||
|
|
||||||
if [ "${1##*.}" = "png" ]; then
|
if [ "${1##*.}" = "png" ]; then
|
||||||
#optipng -o1 -clobber -quiet $1 -out $2.firstpass
|
#optipng -o1 -clobber -quiet "$1" -out "$2.firstpass"
|
||||||
optipng -o1 -quiet $1 -out $2.firstpass
|
echo optipng -o1 -quiet "$1" -out "$2.firstpass"
|
||||||
pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null
|
optipng -o1 -quiet "$1" -out "$2.firstpass"
|
||||||
rm -fr $2.firstpass
|
pngcrush -q -rem alla -reduce "$2.firstpass" "$2" >/dev/null
|
||||||
|
rm -fr "$2.firstpass"
|
||||||
fi
|
fi
|
||||||
if [ "${1##*.}" = "jpg" -o "${1##*.}" = "jpeg" ]; then
|
if [ "${1##*.}" = "jpg" -o "${1##*.}" = "jpeg" ]; then
|
||||||
jpegtran -copy none -progressive $1 > $2
|
jpegtran -copy none -progressive "$1" > $2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
output_file_size=$(stat -c%s "$2")
|
output_file_size=$(stat -c%s "$2")
|
||||||
@ -120,8 +121,8 @@ main()
|
|||||||
|
|
||||||
# Search of all jpg/jpeg/png in $INPUT
|
# Search of all jpg/jpeg/png in $INPUT
|
||||||
# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
|
# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
|
||||||
echo "Scan $INPUT to find images"
|
echo "Scan $INPUT to find images with find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v $OUTPUT"
|
||||||
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
|
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v '/documents/' | grep -v $OUTPUT)
|
||||||
|
|
||||||
if [ "$QUIET" == "0" ]; then
|
if [ "$QUIET" == "0" ]; then
|
||||||
echo --- Optimizing $INPUT ---
|
echo --- Optimizing $INPUT ---
|
||||||
@ -135,11 +136,11 @@ main()
|
|||||||
printf '%*.*s' 0 $((linelength - ${#filename} - ${#sDone} )) "$pad"
|
printf '%*.*s' 0 $((linelength - ${#filename} - ${#sDone} )) "$pad"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
optimize_image $CURRENT_IMAGE $OUTPUT/$filename
|
optimize_image "$CURRENT_IMAGE" "$OUTPUT/$filename"
|
||||||
|
|
||||||
# Replace file
|
# Replace file
|
||||||
if [[ "$INPLACE" == "1" ]]; then
|
if [[ "$INPLACE" == "1" ]]; then
|
||||||
mv $OUTPUT/$filename $CURRENT_IMAGE
|
mv "$OUTPUT/$filename" "$CURRENT_IMAGE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$QUIET" == "0" ]; then
|
if [ "$QUIET" == "0" ]; then
|
||||||
|
|||||||
0
htdocs/includes/OAuth/OAuth2/Service/WordPress.php
Executable file → Normal file
0
htdocs/includes/OAuth/OAuth2/Service/WordPress.php
Executable file → Normal file
0
htdocs/ticket/card.php
Executable file → Normal file
0
htdocs/ticket/card.php
Executable file → Normal file
Loading…
Reference in New Issue
Block a user