diff --git a/dev/tools/fixdosfiles.sh b/dev/tools/fixdosfiles.sh index 4be867aea98..e5e5d97b554 100755 --- a/dev/tools/fixdosfiles.sh +++ b/dev/tools/fixdosfiles.sh @@ -17,14 +17,14 @@ fi # To detec if [ "x$1" = "xlist" ] 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 "*.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 "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 "CRLF" | grep -v 'custom\/' | grep -v 'documents\/website' | grep -v 'documents\/medias' | grep -v 'documents\/sellyoursaas' | grep -v 'htdocs\/includes' | grep CRLF fi # To convert if [ "x$1" = "xfix" ] 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 echo "Fix file $fic" dos2unix "$fic" diff --git a/dev/tools/optimize_images.sh b/dev/tools/optimize_images.sh index dd538c5e1aa..89717063006 100755 --- a/dev/tools/optimize_images.sh +++ b/dev/tools/optimize_images.sh @@ -39,13 +39,14 @@ optimize_image() max_input_size=$(expr $max_input_size + $input_file_size) if [ "${1##*.}" = "png" ]; then - #optipng -o1 -clobber -quiet $1 -out $2.firstpass - optipng -o1 -quiet $1 -out $2.firstpass - pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null - rm -fr $2.firstpass + #optipng -o1 -clobber -quiet "$1" -out "$2.firstpass" + echo optipng -o1 -quiet "$1" -out "$2.firstpass" + optipng -o1 -quiet "$1" -out "$2.firstpass" + pngcrush -q -rem alla -reduce "$2.firstpass" "$2" >/dev/null + rm -fr "$2.firstpass" fi if [ "${1##*.}" = "jpg" -o "${1##*.}" = "jpeg" ]; then - jpegtran -copy none -progressive $1 > $2 + jpegtran -copy none -progressive "$1" > $2 fi output_file_size=$(stat -c%s "$2") @@ -120,8 +121,8 @@ main() # Search of all jpg/jpeg/png in $INPUT # We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT - echo "Scan $INPUT to find images" - IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT) + 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 '/gource/' | grep -v '/includes/' | grep -v '/custom/' | grep -v '/documents/' | grep -v $OUTPUT) if [ "$QUIET" == "0" ]; then echo --- Optimizing $INPUT --- @@ -135,11 +136,11 @@ main() printf '%*.*s' 0 $((linelength - ${#filename} - ${#sDone} )) "$pad" fi - optimize_image $CURRENT_IMAGE $OUTPUT/$filename + optimize_image "$CURRENT_IMAGE" "$OUTPUT/$filename" # Replace file if [[ "$INPLACE" == "1" ]]; then - mv $OUTPUT/$filename $CURRENT_IMAGE + mv "$OUTPUT/$filename" "$CURRENT_IMAGE" fi if [ "$QUIET" == "0" ]; then diff --git a/htdocs/includes/OAuth/OAuth2/Service/WordPress.php b/htdocs/includes/OAuth/OAuth2/Service/WordPress.php old mode 100755 new mode 100644 diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php old mode 100755 new mode 100644