Permalink
Browse files

test portability

  • Loading branch information...
1 parent 016de1e commit 21541bfee8552c8d1d0403fabaab861fac11cb95 @dragon3 committed Apr 19, 2012
View
@@ -1,5 +1,4 @@
#!/bin/bash
-basedir=$(cd $(dirname $(readlink -e $0));pwd)
./01_build_httpd.sh
./02_build_mod_google_analytics.sh
./03_do_test.sh
View
@@ -1,5 +1,5 @@
#!/bin/bash
-basedir=$(cd $(dirname $(readlink -e $0));pwd)
+basedir=$(cd $(dirname $0);pwd)
rm -rf src httpd
mkdir -p src
@@ -1,16 +1,16 @@
#!/bin/bash
cwd=$(pwd)
-basedir=$(cd $(dirname $(readlink -e $0));pwd)
+basedir=$(cd $(dirname $0);pwd)
if [ ! -f "${basedir}/httpd/bin/apxs" ]; then
echo "apxs not found ( please run ./01_build_httpd.sh )"
exit 1
fi
-cd ../
+pushd ..
perl -pi'.orig' -e "s|basedir=/usr/share/apache2|basedir=${basedir}/httpd|" Makefile
make
make install
-mv Makefile.orig Makefile
make clean
-cd ${cwd}
+mv Makefile.orig Makefile
+popd
View
@@ -1,6 +1,6 @@
#!/bin/bash
cwd=$(pwd)
-basedir=$(cd $(dirname $(readlink -e $0));pwd)
+basedir=$(cd $(dirname $0);pwd)
if [ ! -f "${basedir}/httpd/bin/apxs" ]; then
echo "apxs not found ( please run 01_build_httpd.sh )"
@@ -18,6 +18,7 @@ echo "----------------------------------------------------------------------"
rm -f httpd/conf/httpd.conf
cp "${basedir}/conf/httpd-simple.conf" httpd/conf/httpd.conf
perl -pi -e "s|\@\@basedir\@\@|${basedir}|g" httpd/conf/httpd.conf
+perl -pi -e "s|yamamoto|${USER}|g" httpd/conf/httpd.conf
./httpd/bin/apachectl -f "${basedir}/httpd/conf/httpd.conf"
TEST_ACCOUNT_NUMBER="UA-1234567-8" TEST_MOBILE_ACCOUNT_NUMBER="MO-1234567-8" prove t/
TEST_ACCOUNT_NUMBER="UA-1234567-8" TEST_MOBILE_ACCOUNT_NUMBER="MO-1234567-8" TEST_REFEER="http://github.com" prove t/
@@ -32,6 +33,7 @@ echo "----------------------------------------------------------------------"
rm -f httpd/conf/httpd.conf
cp "${basedir}/conf/httpd-vhost.conf" httpd/conf/httpd.conf
perl -pi -e "s|\@\@basedir\@\@|${basedir}|g" httpd/conf/httpd.conf
+perl -pi -e "s|yamamoto|${USER}|g" httpd/conf/httpd.conf
./httpd/bin/apachectl -f "${basedir}/httpd/conf/httpd.conf"
TEST_ACCOUNT_NUMBER="UA-9876543-2" TEST_MOBILE_ACCOUNT_NUMBER="MO-9876543-2" prove t/
TEST_ACCOUNT_NUMBER="UA-9876543-2" TEST_MOBILE_ACCOUNT_NUMBER="MO-9876543-2" TEST_REFEER="http://google.com" prove t/
@@ -46,6 +48,7 @@ echo "----------------------------------------------------------------------"
rm -f httpd/conf/httpd.conf
cp "${basedir}/conf/httpd-perdir.conf" httpd/conf/httpd.conf
perl -pi -e "s|\@\@basedir\@\@|${basedir}|g" httpd/conf/httpd.conf
+perl -pi -e "s|yamamoto|${USER}|g" httpd/conf/httpd.conf
mkdir -p httpd/htdocs/dir1
cp -a httpd/htdocs/index.html httpd/htdocs/dir1/
./httpd/bin/apachectl -f "${basedir}/httpd/conf/httpd.conf"
@@ -2,7 +2,6 @@ ServerRoot "@@basedir@@/httpd"
Listen 38080
User yamamoto
-Group yamamoto
ServerAdmin you@example.com
ServerName 127.0.0.1:38080
@@ -2,7 +2,6 @@ ServerRoot "@@basedir@@/httpd"
Listen 38080
User yamamoto
-Group yamamoto
ServerAdmin you@example.com
ServerName 127.0.0.1:38080
@@ -2,7 +2,6 @@ ServerRoot "@@basedir@@/httpd"
Listen 38080
User yamamoto
-Group yamamoto
ServerAdmin you@example.com
ServerName 127.0.0.1:38080

0 comments on commit 21541bf

Please sign in to comment.