2
# Copyright (C) 2011 Dachary <loic@dachary.org>
4
# This software's license gives you freedom; you can copy, convey,
5
# propagate, redistribute and/or modify this program under the terms of
6
# the GNU Affero General Public License (AGPL) as published by the Free
7
# Software Foundation (FSF), either version 3 of the License, or (at your
8
# option) any later version of the AGPL published by the FSF.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
13
# General Public License for more details.
15
# You should have received a copy of the GNU Affero General Public License
16
# along with this program in a file in the toplevel directory called
17
# "AGPLv3". If not, see <http://www.gnu.org/licenses/>.
19
# wget http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.6.zip
20
YUICOMPRESSOR=/var/www/yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar
22
JS=js/jquery/jquery-1.6.2.js js/supplant.js tablesorter/jquery.tablesorter.js tablesorter/jquery.tablesorter.pager.js js/jquery.metadata.js js/jquery.cookie.js jscrollpane/jquery.jscrollpane.js js/jquery.cardstories.js test/skin.js js/jquery.query-2.1.7.js js/jquery.placeholder-1.0.1.js
24
MINIFIED=cardstories.js cardstories.png cardstories.css index.html
32
index.html: cardstories.html
33
echo ' <!DOCTYPE html>' > index.html
34
echo '<html>' >> index.html
35
echo '<head>' >> index.html
36
echo ' <title>Cardstories</title>'
37
echo ' <meta http-equiv="Content-type" content="text/html;charset=UTF-8">' >> index.html
38
echo ' <script type="text/javascript" src="cardstories.js"></script>' >> index.html
39
echo ' <link rel="stylesheet" href="cardstories.css" type="text/css" media="screen">' >> index.html
40
echo '</head>' >> index.html
41
perl -ne 'print if(/<body>/../EOF/);' < cardstories.html >> index.html
43
cardstories.css cardstories.png: css/cardstories.css
45
cp css/cardstories.png .
46
if [ -f ${YUICOMPRESSOR} ] ; then \
47
java -jar ${YUICOMPRESSOR} -o cardstories.css css/cardstories.css ; \
49
cp css/cardstories.css cardstories.css ; \
54
if [ -f ${YUICOMPRESSOR} ] ; then \
55
java -jar ${YUICOMPRESSOR} -o cardstories.js merged.js ; \
57
cp merged.js cardstories.js ; \