Source

o-blog / update-bootstrap

#!/bin/sh

SRC=$(dirname $0)/bootstrap
SRC_JS=$SRC/js
SRC_LESS=$SRC/less
SRC_IMG=$SRC/img

DST=$(dirname $0)/templates/style/bootstrap

SRC_FONT_AWESOME=$(dirname $0)/Font-Awesome/font
DST_FONT_AWESOME=$(dirname $0)/templates/style/Font-Awesome
SRC_FONT_AWESOME_LESS=$(dirname $0)/Font-Awesome/less


for d in $SRC_JS $SRC_LESS $SRC_IMG; do
    cp -a $d $DST
done

rm -rf $DST/js/tests $DST/less/tests $DST/js/README.md

mkdir -p $DST_FONT_AWESOME
cp -a $SRC_FONT_AWESOME $DST_FONT_AWESOME
cp -a $SRC_FONT_AWESOME_LESS $DST_FONT_AWESOME

sed -i  's,@import "sprites.less";,@import "../../Font-Awesome/less/font-awesome.less";,' $DST/less/bootstrap.less