From 55d5dd2b4626094b1118102a1fd98ef6269ec777 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sat, 6 Aug 2016 20:59:51 -0700 Subject: [PATCH] Hopefully a fix for the travis bash script. --- examples/todo/bootstrap.sh | 8 ++++---- scripts/test.sh | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/todo/bootstrap.sh b/examples/todo/bootstrap.sh index c41ac48a..ce89ebe6 100755 --- a/examples/todo/bootstrap.sh +++ b/examples/todo/bootstrap.sh @@ -1,12 +1,12 @@ #! /usr/bin/env bash -SCRIPTPATH=$(cd "$(dirname "$0")" ; pwd -P) -DATABASE_URL=${SCRIPTPATH}/db/db.sql +SCRIPT_PATH=$(cd "$(dirname "$0")" ; pwd -P) +DATABASE_URL=${SCRIPT_PATH}/db/db.sql -pushd $SCRIPTPATH +pushd $SCRIPT_PATH # install the diesel CLI tools cargo install diesel_cli # create db/db.sql diesel migration --database-url=$DATABASE_URL run -popd $SCRIPTPATH +popd $SCRIPT_PATH diff --git a/scripts/test.sh b/scripts/test.sh index a4857a05..9150a245 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -5,6 +5,9 @@ EXAMPLES_DIR="examples" LIB_DIR="lib" MACROS_DIR="macros" +# Add Cargo to PATH. +export PATH=${HOME}/.cargo/bin:${PATH} + function build_and_test() { local dir=$1 if [ -z "${dir}" ] || ! [ -d "${dir}" ]; then