1. Rufus Pollock
  2. wdmmg

Source

wdmmg / install_data.sh

#!/bin/bash
# ---------------------------------------------------------------------
# Gets CRA/GLA/COFOG data packages and add to WDMMG datastore
# NB adding full CRA is slow: >70k entry rows
# ---------------------------------------------------------------------

WDMMG_DIR='.' # Edit this for your machine 
DATA_DIR=${WDMMG_DIR}/pylons_data/getdata/
mkdir -p "$DATA_DIR"
cd -- "$WDMMG_DIR"

echo '---- GETTING COFOG DATA ----'
mkdir -p "$DATA_DIR/cofog"
datapkg download ckan://cofog "$DATA_DIR"
echo '---- INSTALLING COFOG DATA ----'
paster load cofog

# NB ordering is important here: CRA depends on COFOG
echo '---- GETTING CRA DATA ----'
rm -rf ${DATA_DIR}/ukgov-finances-cra
hg clone http://bitbucket.org/okfn/ukgov-finances-cra ${DATA_DIR}/ukgov-finances-cra
datapkg download ckan://ukgov-finances-cra $DATA_DIR
echo '---- INSTALLING CRA DATA ----'
#paster load cra

echo 'hello'
# GLA - loader needs fixing
echo '---- GETTING GLA DATA ----'
datapkg download ckan://gla-spending "$DATA_DIR"
#echo '---- INSTALLING GLA DATA ----'
#paster load gla