Make todo example bootstrapping more resilient.

This commit is contained in:
Sergio Benitez 2017-06-01 21:59:06 -07:00
parent e42fe78e41
commit f1ec552ac5
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@ SCRIPT_PATH=$(cd "$(dirname "$0")" ; pwd -P)
DATABASE_URL=${SCRIPT_PATH}/db/db.sql DATABASE_URL=${SCRIPT_PATH}/db/db.sql
pushd $SCRIPT_PATH > /dev/null pushd $SCRIPT_PATH > /dev/null
# clear an existing database
rm -f $DATABASE_URL
# install the diesel CLI tools if they're not installed # install the diesel CLI tools if they're not installed
if ! command -v diesel >/dev/null 2>&1; then if ! command -v diesel >/dev/null 2>&1; then
cargo install diesel_cli --no-default-features --features=sqlite > /dev/null cargo install diesel_cli --no-default-features --features=sqlite > /dev/null