summaryrefslogtreecommitdiffstats
path: root/update
blob: c0a02c13f7aed95a7bc3d42a4374581e53ec21da (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
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
#!/usr/bin/env zsh
#
# WebNomad, your slick and static website publisher
#
# Copyright (C) 2012-2013 Denis Roio <jaromil@dyne.org>
#
# This source  code is free  software; you can redistribute  it and/or
# modify it under the terms of  the GNU Public License as published by
# the Free  Software Foundation; either  version 3 of the  License, or
# (at your option) any later version.
#
# This source code is distributed in  the hope that it will be useful,
# but  WITHOUT ANY  WARRANTY;  without even  the  implied warranty  of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Please refer to the GNU Public License for more details.
#
# You should have received a copy of the GNU Public License along with
# this source code; if not, write to:
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


{ test -r init } || {
    echo "Error: update must be run from inside the webnomad directory"
    return 1 }

source utils

# eventually these will need an update
bootstrap2="http://getbootstrap.com/2.3.2/assets/bootstrap.zip"
blueimp_gallery="https://github.com/blueimp/Gallery.git"

{ test "$1" = "" } || { test "$1" = "bootstrap" } && {
notice "Downloading and installing the latest Bootstrap2"
act "url: $bootstrap2"
curl "$bootstrap2" -o bootstrap.zip
unzip -q bootstrap.zip
rsync -r bootstrap/css .
rsync -r bootstrap/js .
rsync -r bootstrap/img .
rm -rf bootstrap bootstrap.zip
act "Bootstrap2 installed"
}

{ test "$1" = "" } || { test "$1" = "blueimp" } && {
notice "Downloading and installing BlueImp gallery"
git clone ${blueimp_gallery} blueimp
rsync -r blueimp/css .
rsync -r blueimp/js .
rsync -r blueimp/img .
rm -rf blueimp
act "BlueImp installed"
}