makes sed be darwin or linux hopefully

This commit is contained in:
Timothy Prepscius 2013-10-03 00:00:30 -04:00
parent 40274be6ae
commit 3420c7565c
4 changed files with 22 additions and 14 deletions

View File

@ -19,14 +19,14 @@ learnmore=../web/learnmore
function replaceStrings() {
echo $1 $M
sed -i '' -f replace_html.sed $1
sed -i '' -f replace_html_$M.sed $1
sed -i '' -e s/__VERSION__/$V/g $1
sed -i '' -e s/__THIS_YEAR__/2013/g $1
./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
echo $COMPANY
sed -i '' -e s/{##TITLE##}/$APP_TITLE/g $1
sed -i '' -e s/{##COMPANY##}/"$COMPANY"/g $1
./seds -e s/{##TITLE##}/$APP_TITLE/g $1
./seds -e s/{##COMPANY##}/"$COMPANY"/g $1
}
echo Compiling CSS/JS

View File

@ -11,15 +11,15 @@ HOST_WEB=`cat ../config/hosts/web_$M`
RECAPTCHA_PUBLIC_KEY=`cat ../keys/recaptcha/public.key`
function replaceStrings() {
sed -i '' -f replace_js_$M.sed $1
sed -i '' -e s/__VERSION__/$V/g $1
sed -i '' -e s/__THIS_YEAR__/2013/g $1
./seds -f replace_js_$M.sed $1
./seds -e s/__VERSION__/$V/g $1
./seds -e s/__THIS_YEAR__/2013/g $1
sed -i '' -e s/{##HOST_PRIMARY##}/$HOST_PRIMARY/g $1
sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1
sed -i '' -e s/{##RECAPTCHA_PUBLIC_KEY##}/$RECAPTCHA_PUBLIC_KEY/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
}
echo Replacing Strings

7
build/seds Executable file
View File

@ -0,0 +1,7 @@
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
sed -i $*
elif [[ "$unamestr" == 'Darwin' ]]; then
sed -i '' $*
fi

View File

@ -3,6 +3,7 @@
# I realized: why bother?
apt-get install software-properties-common --yes
apt-get install python-software-properties --yes
add-apt-repository ppa:webupd8team/java --yes
apt-get update