Skip to content

Commit

Permalink
Fix for bootstrap script
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Jul 4, 2023
1 parent 4f6f52f commit 2e27d75
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions utils/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ done
REGION=${region}
COUNTRY=${country}
HOST=${host:-localhost}
USER=${user:-underpass}
PORT=${port:-5439}
DB=${database:-underpass}

if [ -n "${user}" ]
then
USER=${user}
else
USER=$(whoami)
fi

if [ -n "${REGION}" ] && [ -n "${COUNTRY}" ]
then

Expand Down Expand Up @@ -88,7 +94,7 @@ then
PGPASSWORD=$PASS psql --host $HOST --user $USER --port $PORT $DB < raw-underpass.sql

echo "Configuring Underpass ..."
wget python3 poly2geojson.py $COUNTRY.poly && \
python3 poly2geojson.py $COUNTRY.poly && \
cp $COUNTRY.geojson ../config/priority.geojson && \
cd ../build && \
make install && \
Expand All @@ -111,7 +117,7 @@ else
echo " -r region (Region for bootstrapping)"
echo " africa, antartica, asia, australia, central-america,"
echo " europe, north-america or south-america"
echo " -r country (Country inside the region)"
echo " -c country (Country inside the region)"
echo " -h host (Database host)"
echo " -u user (Database user)"
echo " -p port (Database port)"
Expand Down

0 comments on commit 2e27d75

Please sign in to comment.