summaryrefslogtreecommitdiffstats
path: root/data/grab-dump.sh
blob: 9a740cd526be4e7a03b81475710393ee10df023e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/zsh

dump_url="$1"
dump_file=$(basename "${dump_url%.bz2}")

if [[ ! -f "${dump_file}.bz2" && ! -f "${dump_file}" ]];
then
    wget "${dump_url}"
fi

if [ ! -f "${dump_file}" ];
then
    bunzip2 -d "${dump_file}.bz2"
fi