Skip to content

Instantly share code, notes, and snippets.

@edtoken
Last active August 29, 2015 13:56
Show Gist options
  • Save edtoken/8868968 to your computer and use it in GitHub Desktop.
Save edtoken/8868968 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo -n "compile styles? 1 = NO / 2 = Yes"
read compile_style
if [ "$compile_style" = "1" ]
then
####false
echo "styles not compiled"
fi
if [ "$compile_style" = "2" ]
then
####true
echo "compress styles..."
rm style.min.css
yui-compressor style.css -o style.min.css
styles=(
'animations'
'editor-style'
'font-awesome'
'isotope'
'meanmenu'
'prettyPhoto'
'reset'
'responsive'
'shortcode'
'style');
for style in ${styles[@]}
do
rm css/$style.min.css
yui-compressor css/$style.css -o css/$style.min.css
echo "compress $style ..."
done
rm skins/skyblue/style.min.css
yui-compressor skins/skyblue/style.css -o skins/skyblue/style.min.css
fi
echo -n "compile js? 1 = NO / 2 = Yes"
read compile_js
if [ "$compile_js" = "1" ]
then
####false
echo "js not compiled"
fi
if [ "$compile_js" = "2" ]
then
### true
echo "compile js...";
files=(
'custom'
'jquery.cookie'
'jquery.donutchart'
'jquery.inview'
'jquery.nav'
'jquery.prettyPhoto'
'jquery.scrollTo'
'jquery-easing-1.3'
'jquery-menu'
);
for file in ${files[@]}
do
rm framework/js/public/$file.min.js
yui-compressor framework/js/public/$file.js -o framework/js/public/$file.min.js
echo "compress $file ..."
done
fi
echo "[[[[ ready ]]]]";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment