Skip to content

Instantly share code, notes, and snippets.

@morsvox
Created November 2, 2017 10:45
Show Gist options
  • Save morsvox/3905463910b41f8629c1951ff8bf92ba to your computer and use it in GitHub Desktop.
Save morsvox/3905463910b41f8629c1951ff8bf92ba to your computer and use it in GitHub Desktop.
bash script for bitrix optim
#!/bin/sh
cd $HOME/public_html/local/templates/oknapolis
gulp
echo "upload optimize"
cd $HOME/public_html/upload/
find -type f -iname "*.jpg" -exec jpegoptim --strip-all --all-progressive -pm85 {} \;
echo "build optimize"
cd $HOME/public_html/local/templates/oknapolis/build/images/
find -type f -iname "*.jpg" -exec jpegoptim --strip-all --all-progressive -pm85 {} \;
@morsvox
Copy link
Author

morsvox commented Aug 6, 2018

#!/bin/bash
#берем имя найденого файла в переменную
name=`find ./ -name '*.jpg'`
#выпроеяем оптимизацию
jpegoptim --strip-all --all-progressive -pm85 $name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment