aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/install.sh.in
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/common_test/install.sh.in
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/common_test/install.sh.in')
-rw-r--r--lib/common_test/install.sh.in53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/common_test/install.sh.in b/lib/common_test/install.sh.in
new file mode 100644
index 0000000000..5108c7a259
--- /dev/null
+++ b/lib/common_test/install.sh.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+CT_ROOT=$1
+CT_VSN=@CT_VSN@
+TS_VSN=@TS_VSN@
+
+if [ -z "$CT_ROOT" ]
+then
+ echo "install.sh: need CT_ROOT (absolute) directory or 'local' as argument"
+ exit 1
+fi
+
+if [ $CT_ROOT = "local" ]
+then
+ CT_DIR=`pwd`
+ cd priv
+ sed -e "s,@CTPATH@,$CT_DIR/ebin," \
+ -e "s,@TSPATH@,$CT_DIR/../test_server/ebin," \
+ run_test.in > bin/run_test
+ chmod 775 bin/run_test
+ echo "install successful, start script created in " $CT_ROOT/common_test-$CT_VSN/priv/bin
+else
+
+ if [ ! -d "$CT_ROOT" ]
+ then
+ echo "install.sh: CT_ROOT argument must be a valid directory"
+ exit 1
+ fi
+
+ if [ `echo $CT_ROOT | awk '{ print substr($1,1,1) }'` != "/" ]
+ then
+ echo "install.sh: need an absolute path to CT_ROOT"
+ exit 1
+ fi
+
+ if [ ! -d $CT_ROOT/common_test-$CT_VSN ]
+ then
+ echo "install.sh: The directory $CT_ROOT/common_test-$CT_VSN does not exist"
+ exit 1
+ fi
+
+ if [ -d $CT_ROOT/common_test-$CT_VSN/priv ]
+ then
+ cd $CT_ROOT/common_test-$CT_VSN/priv
+ sed -e "s;@CTPATH@;$CT_ROOT/common_test-$CT_VSN/ebin;" \
+ -e "s;@TSPATH@;$CT_ROOT/test_server-$TS_VSN/ebin;" \
+ run_test.in > bin/run_test
+ chmod 775 bin/run_test
+ echo "install successful, start script created in " $CT_ROOT/common_test-$CT_VSN/priv/bin
+ fi
+fi
+
+