lib.sh 644 Bytes
Newer Older
Nicolas Joyard's avatar
Nicolas Joyard committed
1
function parltrack_download_pipe() {
Jamesie Pic's avatar
Jamesie Pic committed
2 3 4 5 6 7 8
    [ -n "$CLEAN" ] && rm -rf $1
    [ -f "$1" ] || wget http://parltrack.euwiki.org/dumps/$1 || exit 1

    export DJANGO_SETTINGS_MODULE=memopol.settings
    unxz -c ${OPENSHIFT_DATA_DIR}$1 | $2
    [ -n "$CLEAN" ] && rm -rf $1
}
Nicolas Joyard's avatar
Nicolas Joyard committed
9 10 11

function francedata_download_pipe() {
    [ -n "$CLEAN" ] && rm -rf $1
12
    [ -f "$1" ] || wget https://memopol.ladn.fr/fd/$1 || exit 1
Nicolas Joyard's avatar
Nicolas Joyard committed
13 14 15 16 17

    export DJANGO_SETTINGS_MODULE=memopol.settings
    gunzip -c ${OPENSHIFT_DATA_DIR}$1 | $2
    [ -n "$CLEAN" ] && rm -rf $1
}
18 19 20

function refresh_scores() {
    export DJANGO_SETTINGS_MODULE=memopol.settings
Nicolas Joyard's avatar
Nicolas Joyard committed
21
    memopol refresh_scores
22
}