Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 09:08:18 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 09:08:18 +0300
commit02b9388fc66568acbcb0381deb11cb21ba8380a6 (patch)
tree1b061b829c0398373b8150138c625f25d25d436d /build
parent989614f9d5faa11157b232785537eb5cca927649 (diff)
Move image-optimization.sh to build dir
* We should not ship this! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/image-optimization.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/image-optimization.sh b/build/image-optimization.sh
new file mode 100755
index 00000000000..cf82e120dcd
--- /dev/null
+++ b/build/image-optimization.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+function recursive_optimize_images() {
+cd $1;
+optipng -o6 -strip all *.png;
+jpegoptim --strip-all *.jpg;
+for svg in `ls *.svg`;
+do
+ mv $svg $svg.opttmp;
+ scour -i $svg.opttmp -o $svg --create-groups --enable-id-stripping --enable-comment-stripping --shorten-ids --remove-metadata --strip-xml-prolog --no-line-breaks;
+done;
+rm *.opttmp
+for dir in `ls -d */`;
+do
+ recursive_optimize_images $dir;
+ cd ..;
+done;
+}
+
+recursive_optimize_images ../