Fix up test scratch project snippet to accept a project as an arg

This commit is contained in:
Lucien Greathouse
2018-12-17 18:38:29 -08:00
parent 9ac7ebc335
commit 645ab0ae98

View File

@@ -2,11 +2,17 @@
set -e set -e
if [ ! -d "../test-projects/$1" ]
then
echo "Pick a project that exists!"
exit 1
fi
if [ -d "scratch" ] if [ -d "scratch" ]
then then
rm -rf scratch rm -rf scratch
fi fi
mkdir -p scratch mkdir -p scratch
cp -r ../test-projects/test-model scratch cp -r "../test-projects/$1" scratch
cargo run -- serve scratch/test-model cargo run -- serve "scratch/$1"