From 645ab0ae983b9159364ea03cfc63a3f6a4d34ee1 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Mon, 17 Dec 2018 18:38:29 -0800 Subject: [PATCH] Fix up test scratch project snippet to accept a project as an arg --- server/test-scratch-project | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/test-scratch-project b/server/test-scratch-project index a9d498ee..f227ef13 100644 --- a/server/test-scratch-project +++ b/server/test-scratch-project @@ -2,11 +2,17 @@ set -e +if [ ! -d "../test-projects/$1" ] +then + echo "Pick a project that exists!" + exit 1 +fi + if [ -d "scratch" ] then rm -rf scratch fi mkdir -p scratch -cp -r ../test-projects/test-model scratch -cargo run -- serve scratch/test-model \ No newline at end of file +cp -r "../test-projects/$1" scratch +cargo run -- serve "scratch/$1" \ No newline at end of file