diff --git a/build/compile-web-html b/build/compile-web-html
index 58267e8..a14747f 100755
--- a/build/compile-web-html
+++ b/build/compile-web-html
@@ -7,6 +7,8 @@ M=$2
APP_TITLE=`cat ../config/title`
COMPANY=`cat ../config/company`
+source ./seds
+
dst=www
cmn_src=../web/common
client_src=../web/client
@@ -19,14 +21,14 @@ learnmore=../web/learnmore
function replaceStrings() {
echo $1 $M
- ./seds -f replace_html.sed $1
- ./seds -f replace_html_$M.sed $1
- ./seds -e s/__VERSION__/$V/g $1
- ./seds -e s/__THIS_YEAR__/2013/g $1
+ $sed -f replace_html.sed $1
+ $sed -f replace_html_$M.sed $1
+ $sed -e s/__VERSION__/$V/g $1
+ $sed -e s/__THIS_YEAR__/2013/g $1
echo $COMPANY
- ./seds -e s/{##TITLE##}/$APP_TITLE/g $1
- ./seds -e s/{##COMPANY##}/"$COMPANY"/g $1
+ $sed -e s/{##TITLE##}/$APP_TITLE/g $1
+ $sed -e s/{##COMPANY##}/"$COMPANY"/g $1
}
echo Compiling CSS/JS
diff --git a/build/compile-web-js b/build/compile-web-js
index 29f7b93..f3d275a 100755
--- a/build/compile-web-js
+++ b/build/compile-web-js
@@ -4,6 +4,8 @@ V=$1
M=$2
dst=www
+source ./seds
+
HOST_PRIMARY=`cat ../config/hosts/$M`
HOST_AUTH=`cat ../config/hosts/auth_$M`
HOST_TOMCAT=`cat ../config/hosts/tomcat_$M`
@@ -11,15 +13,15 @@ HOST_WEB=`cat ../config/hosts/web_$M`
RECAPTCHA_PUBLIC_KEY=`cat ../keys/recaptcha/public.key`
function replaceStrings() {
- ./seds -f replace_js_$M.sed $1
- ./seds -e s/__VERSION__/$V/g $1
- ./seds -e s/__THIS_YEAR__/2013/g $1
+ $sed -f replace_js_$M.sed $1
+ $sed -e s/__VERSION__/$V/g $1
+ $sed -e s/__THIS_YEAR__/2013/g $1
- ./seds -e s/{##HOST_PRIMARY##}/$HOST_PRIMARY/g $1
- ./seds -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
- ./seds -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
- ./seds -e s/{##HOST_WEB##}/$HOST_WEB/g $1
- ./seds -e s/{##RECAPTCHA_PUBLIC_KEY##}/$RECAPTCHA_PUBLIC_KEY/g $1
+ $sed -e s/{##HOST_PRIMARY##}/$HOST_PRIMARY/g $1
+ $sed -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
+ $sed -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
+ $sed -e s/{##HOST_WEB##}/$HOST_WEB/g $1
+ $sed -e s/{##RECAPTCHA_PUBLIC_KEY##}/$RECAPTCHA_PUBLIC_KEY/g $1
}
echo Replacing Strings
diff --git a/build/seds b/build/seds
index 0741a9b..f86c2d3 100755
--- a/build/seds
+++ b/build/seds
@@ -1,7 +1,8 @@
+
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
- sed -i $*
+ sed="sed -i"
elif [[ "$unamestr" == 'Darwin' ]]; then
- sed -i '' $*
+ sed="sed -i ''"
fi
diff --git a/java/ext/make-bc-packaged b/java/ext/make-bc-packaged
index ed33742..85eaebf 100755
--- a/java/ext/make-bc-packaged
+++ b/java/ext/make-bc-packaged
@@ -1,4 +1,7 @@
set -x
+
+source ../../build/seds
+
rm -rf bc-packaged
tar -hczf bc-project.tar.gz bc-project/
@@ -8,7 +11,7 @@ tar xzf ../bc-project.tar.gz
rm ../bc-project.tar.gz
cd bc-project
-find . -type f -name "*.java" -print0 | xargs -0 ../../build/seds 's/org.bouncycastle/org.bc/g'
+find . -type f -name "*.java" -print0 | xargs -0 $sed 's/org.bouncycastle/org.bc/g'
for DIR in $(find . -type d -name "bouncycastle")
do