Skip to content

Commit

Permalink
Update bootstrap.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Mar 15, 2017
1 parent 52587ec commit 0e08435
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,33 @@
# Configure the CSS.

STATIC_FOLDER=lowfat/static/
TMP_FOLDER=/tmp/
BOOTSTRAP_ZIP=/tmp/bootstrap.zip
FONT_AWESOME_ZIP=/tmp/fontawesome.zip
ACADEMICONS_ZIP=/tmp/academicons.zip
GARLIC_ZIP=/tmp/garlic.zip
TMP_FOLDER=$(mktemp -d)
BOOTSTRAP_ZIP=${TMP_FOLDER}/bootstrap.zip
FONT_AWESOME_ZIP=${TMP_FOLDER}/fontawesome.zip
ACADEMICONS_ZIP=${TMP_FOLDER}/academicons.zip
GARLIC_ZIP=${TMP_FOLDER}/garlic.zip
DATETIME_WIDGET_ZIP=${TMP_FOLDER}/datetimewidget.zip

# Bootstrap
curl \
--silent \
-L \
-o $BOOTSTRAP_ZIP \
https://github.com/twbs/bootstrap/releases/download/v3.3.6/bootstrap-3.3.6-dist.zip
unzip \
-q \
-u \
$BOOTSTRAP_ZIP \
-d $TMP_FOLDER

# Font Awesome
curl \
--silent \
-L \
-o $FONT_AWESOME_ZIP \
https://github.com/FortAwesome/Font-Awesome/archive/v4.6.3.zip
unzip \
-q \
-u \
$FONT_AWESOME_ZIP \
-d $TMP_FOLDER
Expand All @@ -33,35 +38,53 @@ unzip \
#
# Supplement for Font Awesome
curl \
--silent \
-L \
-o $ACADEMICONS_ZIP \
https://github.com/jpswalsh/academicons/archive/v1.7.0.zip
unzip \
-q \
-u \
$ACADEMICONS_ZIP \
-d $TMP_FOLDER

# Sorttable
mkdir -p $TMP_FOLDER/sorttable/js
curl \
--silent \
-L \
-o $TMP_FOLDER/sorttable/js/sorttable.js \
http://www.kryogenix.org/code/browser/sorttable/sorttable.js

# Garlic.js
mkdir -p $TMP_FOLDER/garlic/js
curl \
--silent \
-L \
-o $GARLIC_ZIP \
https://github.com/guillaumepotier/Garlic.js/archive/1.2.4.zip
unzip \
-q \
-p \
$GARLIC_ZIP \
Garlic.js-1.2.4/dist/garlic.min.js \
> $TMP_FOLDER/garlic/js/garlic.min.js

# Datetime Widget
curl \
--silent \
-L \
-o $DATETIME_WIDGET_ZIP \
https://github.com/asaglimbeni/django-datetime-widget/archive/master.zip
unzip \
-q \
-u \
$DATETIME_WIDGET_ZIP \
-d $TMP_FOLDER
mv $TMP_FOLDER/django-datetime-widget-master/datetimewidget/static $TMP_FOLDER/datetimewidget/

# Copy files
for folder in css fonts js
do
cp -r $TMP_FOLDER/*/$folder $STATIC_FOLDER
cp -v -r $TMP_FOLDER/*/$folder $STATIC_FOLDER
done

0 comments on commit 0e08435

Please sign in to comment.