aboutsummaryrefslogtreecommitdiffstats
path: root/bin/make_css
blob: c48dda4d6d5ce3edf0bcd197191bc5fc7cc4b53c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# make_css:
# Generate CSS files from SCSS files.
#
# Requires sass which you can get from http://sass-lang.com/
# FixMyStreet cobrand requires compass
#
# Copyright (c) 2012 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
# $Id: send-reports,v 1.79 2010-01-06 16:50:26 louise Exp $

DIRECTORY=$(cd `dirname $0`/../web && pwd)

DIRS=${1:-`find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq`}

for dir in $DIRS; do
    if [ -e "$dir/config.rb" ]; then
        compass compile --output-style compressed $dir
    else
        sass --scss --update --style compressed $dir
    fi
done