hotosm / HDM-CartoCSS

CartoCSS project focused on the Humanitarian Data Model
Other
136 stars 41 forks source link

fetch script assumes data directory exists #273

Open pnorman opened 9 years ago

pnorman commented 9 years ago

./fetch.sh: line 4: cd: data: No such file or directory

The relevant part of the script is

DIR=${2:-'data'}
cd $DIR
echo "Working directory set to ${PWD}"

There's a couple problems here. The first is that it tries to go to data with no indication in the docs that the directory needs to exist, and it doesn't try to create it.

The second is that if the cd command fails for some reason (permissions, directory does not exist, etc), the script blindly continues on.