openlibrary / openlibrary

One webpage for every book ever published!

This URL has Read+Write access

openlibrary / setup.sh
100755 23 lines (20 sloc) 0.516 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash
 
root=`dirname $0`
 
# run git submodule commands only when the working copy is a git repository
# otherwise download tarballs of submodules
if [ -d $root/.git ];
then
git submodule init
    git submodule update
else
function get_tarball() {
        name=$1
        tag=$2
        wget http://github.com/$name/$name/tarball/$tag -O $name.tgz
        tar xvzf $name.tgz
        rm -rf $name
        mv $name-$name-* $name
    }
    get_tarball infogami master
    get_tarball webpy webpy-0.31
fi