1
0
mirror of https://github.com/actix/examples synced 2024-12-18 08:23:10 +01:00
examples/async_db/db/setup_db.sh
Stefano Probst 25f7ce87b4
Fix bug in database script
Fix error that occurs if script is used like in the async_db readme.

Error before this change:
``` bash
$ LANG=C bash db/setup_db.sh
db/setup_db.sh: line 2: db.sql: No such file or directory
Error: cannot open "nyc_centralpark_weather.csv
```
2019-05-24 20:34:08 +02:00

5 lines
147 B
Bash
Executable File

#!/usr/bin/env bash
cd $(dirname "$0")
sqlite3 ../weather.db < db.sql
sqlite3 -csv ../weather.db ".import nyc_centralpark_weather.csv nyc_weather"