Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: tools/resources/optimize-png-files.sh

Issue 23789002: Move & rename build/sanitize-png-files.sh to tools/resources/optimize-png-files.sh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/sanitize-png-files.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/resources/optimize-png-files.sh
diff --git a/build/sanitize-png-files.sh b/tools/resources/optimize-png-files.sh
similarity index 96%
rename from build/sanitize-png-files.sh
rename to tools/resources/optimize-png-files.sh
index e47508e470b0836323b2f590750918a78706ffce..24c451d297499267a850de6af629fe1324e82b94 100755
--- a/build/sanitize-png-files.sh
+++ b/tools/resources/optimize-png-files.sh
@@ -273,8 +273,8 @@ function process_file {
fi
}
-# Usage: sanitize_file <file>
-function sanitize_file {
+# Usage: optimize_file <file>
+function optimize_file {
local file=$1
local name=$(basename $file)
local old=$(stat -c%s $file)
@@ -302,13 +302,13 @@ function sanitize_file {
fi
}
-function sanitize_dir {
+function optimize_dir {
local dir=$1
for f in $(find $dir -name "*.png"); do
if $using_cygwin ; then
- sanitize_file $(cygpath -w $f)
+ optimize_file $(cygpath -w $f)
else
- sanitize_file $f
+ optimize_file $f
fi
done
}
@@ -319,7 +319,8 @@ function install_if_not_installed {
which $program > /dev/null 2>&1
if [ "$?" != "0" ]; then
if $using_cygwin ; then
- echo "Couldn't find $program. Please run setup.exe and install the $package package."
+ echo "Couldn't find $program. " \
+ "Please run cygwin's setup.exe and install the $package package."
exit 1
else
read -p "Couldn't find $program. Do you want to install? (y/n)"
@@ -416,7 +417,7 @@ fi
# Make sure we cleanup temp dir
trap "rm -rf $TMP_DIR" EXIT
-# If no directories are specified, sanitize all directories.
+# If no directories are specified, optimize all directories.
DIRS=$@
set ${DIRS:=$ALL_DIRS}
@@ -425,8 +426,8 @@ for d in $DIRS; do
if $using_cygwin ; then
d=$(cygpath -w $d)
fi
- echo "Sanitizing png files in $d"
- sanitize_dir $d
+ echo "Optimizing png files in $d"
+ optimize_dir $d
echo
done
« no previous file with comments | « build/sanitize-png-files.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698