From 663cecf26249c6a3fdc3a14cfb6de6d7e00155e9 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Fri, 2 Jan 2009 21:25:35 -0600 Subject: [PATCH] script updates --- scripts/addtoproject.sh | 38 ++++++++++++++++++++------------------ scripts/updateproject.sh | 10 ++++++---- tmpl/TapHarness.html | 6 ------ 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/scripts/addtoproject.sh b/scripts/addtoproject.sh index 2f8e717..6d9c675 100755 --- a/scripts/addtoproject.sh +++ b/scripts/addtoproject.sh @@ -28,6 +28,8 @@ do esac done +MYDIR=$(dirname $0) + if [[ -z $DIRNAME ]] then echo "No -d option was present. You must provide a Project path."; @@ -37,37 +39,37 @@ fi echo "Setting up in project: ${DIRNAME}" - -#create our project directory -cd $DIRNAME - #set up the directory structure -if [[ ! -d ext ]] +if [[ ! -d $DIRNAME/ext ]] then - mkdir ext + echo Making ${DIRNAME}/ext + mkdir $DIRNAME/ext fi -if [[ ! -d harness ]] +if [[ ! -d $DIRNAME/harness ]] then - mkdir harness + echo Making ${DIRNAME}/harness + mkdir $DIRNAME/harness fi -if [[ ! -d t || -d tests ]] +if [[ ! -d $DIRNAME/t || -d $DIRNAME/tests ]] then - mkdir t + echo Making ${DIRNAME}/t + mkdir $DIRNAME/t fi -#copy the files we need for initial setup -cp -r -f ~/sandbox/Test-TAP/lib/Test ext/ -if [[ -d t ]] +echo copy the files we need for initial setup +cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/ +if [[ -d $DIRNAME/t ]] then - cp -r -f ~/sandbox/Test-TAP/tmpl/TapHarness.html t/ + echo copying TapHarness.html to $DIRNAME/t/ + cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/t/ elif [[ -d tests ]] then - cp -r -f ~/sandbox/Test-TAP/tmpl/TapHarness.html tests/ + echo copying TapHarness.html to $DIRNAME/tests/ + cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/tests/ fi -cp -r -f ~/sandbox/Test-TAP/tmpl/*rhino* harness/ +echo copying rhino harnesses to $DIRNAME/harness/ +cp -r -f $MYDIR/../tmpl/*rhino* $DIRNAME/harness/ -#now go back to where we started -cd $WORKING diff --git a/scripts/updateproject.sh b/scripts/updateproject.sh index b6381d0..eca027b 100755 --- a/scripts/updateproject.sh +++ b/scripts/updateproject.sh @@ -28,6 +28,8 @@ do esac done +MYDIR=$(dirname $0) + if [[ -z $DIRNAME ]] then echo "No -d option was present. You must provide a Project path."; @@ -42,13 +44,13 @@ echo "Setting up in project: ${DIRNAME}" cd $DIRNAME #set up the directory structure -if [[ ! -d ext ]] +if [[ ! -d $DIRNAME/ext ]] then - mkdir ext + mkdir $DIRNAME/ext fi -#copy the files we need for initial setup -cp -r -f ~/sandbox/Test-TAP/lib/Test ext/ +echo copying the javascript test libraries +cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/ #now go back to where we started cd $WORKING diff --git a/tmpl/TapHarness.html b/tmpl/TapHarness.html index f042f02..26f9cff 100644 --- a/tmpl/TapHarness.html +++ b/tmpl/TapHarness.html @@ -47,11 +47,5 @@ var results = []; -