forked from lmarini/clowder
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
executable file
·54 lines (47 loc) · 1.5 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
VERSION="3.3.1"
# options available:
# cerulean cosmo custom cyborg darkly flatly journal lumen paper
# readable sandstone simplex slate spacelab superhero united yeti
BOOTSWATCH="amelia cyborg journal paper readable sandstone simplex spacelab superhero united"
GLYPHICONS="glyphicons-halflings-regular.eot glyphicons-halflings-regular.svg glyphicons-halflings-regular.ttf glyphicons-halflings-regular.woff"
CDNJS="https://cdnjs.cloudflare.com/ajax/libs/"
# fetch bootstrap
echo -n "Fetching bootstrap.min.js ... "
curl -f -s -L -o tmpfile ${CDNJS}/twitter-bootstrap/${VERSION}/js/bootstrap.min.js
if [ $? == 0 ]; then
mv tmpfile public/javascripts/bootstrap.min.js
echo "OK"
else
echo "ERROR"
fi
echo -n "Fetching bootstrap.min.css ... "
curl -f -s -L -o tmpfile ${CDNJS}/twitter-bootstrap/${VERSION}/css/bootstrap.min.css
if [ $? == 0 ]; then
mv tmpfile public/stylesheets/themes/bootstrap.min.css
echo "OK"
else
echo "ERROR"
fi
# fetch glyphicons
for f in ${GLYPHICONS} ; do
echo -n "Fetching ${f} ... "
curl -f -s -L -o tmpfile ${CDNJS}/twitter-bootstrap/${VERSION}/fonts/$f
if [ $? == 0 ]; then
mv tmpfile public/stylesheets/fonts/${f}
echo "OK"
else
echo "ERROR"
fi
done
# fetch themes from bootswatch
for t in ${BOOTSWATCH}; do
echo -n "Fetching ${t}.min.css ... "
curl -f -s -L -o tmpfile ${CDNJS}/bootswatch/${VERSION}/${t}/bootstrap.min.css
if [ $? == 0 ]; then
mv tmpfile public/stylesheets/themes/${t}.min.css
echo "OK"
else
echo "ERROR"
fi
done