Changeset 18878

Show
Ignore:
Timestamp:
03.04.2009 13:09:02 (10 years ago)
Author:
ak19
Message:

Spaces in paths preserved with quotes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/packages/apache-httpd/install-bindist.sh

    r18827 r18878  
    4545done 
    4646  
    47 if [ .$1 = . ] 
     47if [ "x$1" = "x" ] 
    4848then 
    49   SR=**APACHE_HOME_OS** 
    5049  echo "Number of arguments should be 1. Provide the root directory for the web server." 
    5150  exit 1 
    5251else 
    53   SR=$1 
     52  SR="$1" 
    5453fi 
    5554 
    56 if [ -f $SR/bin/envvars ] 
     55if [ -f "$SR/bin/envvars" ] 
    5756then 
    5857  echo "[Preserving existing envvars settings.]" 
     
    6463# Need to run this script from its own directory  
    6564# instead of whatever directory it may be called from 
    66 currentdir=$(cd `dirname $0` && pwd) 
    67 cd $currentdir 
     65#currentdir=$(cd `dirname "$0"` && pwd) 
     66currentdir="`dirname \"$0\"`" 
     67currentdir="`cd \"$currentdir\" && pwd`" 
     68cd "$currentdir" 
    6869 
    69 sed -e "s%\*\*APACHE_HOME_OS\*\*%$SR%" $SR/conf/httpd.conf.in > $SR/conf/httpd.conf 
     70sed -e "s%\*\*APACHE_HOME_OS\*\*%$SR%" "$SR/conf/httpd.conf.in" > "$SR/conf/httpd.conf" 
    7071 
    7172sed -e "s;^#!\@perlbin\@.*;#!$PERL;" -e "s;\@exp_installbuilddir\@;$SR/build;" \ 
    72     apxs.in > $SR/bin/apxs 
     73    apxs.in > "$SR/bin/apxs" 
    7374 
    7475# usually we're updating existing files, so need to copy them over into tmp files first 
    7576PRE=`grep "^prefix = " build/config_vars.mk` 
    7677PRE=`echo $PRE | sed -e "s;prefix = ;;"` 
    77 sed -e "s;$PRE;$SR;" build/config_vars.mk > $SR/build/config_vars.mk.tmp 
    78 mv $SR/build/config_vars.mk.tmp $SR/build/config_vars.mk 
    79 chmod u+rwx $SR/build/config_vars.mk 
     78sed -e "s;$PRE;$SR;" build/config_vars.mk > "$SR/build/config_vars.mk.tmp" 
     79mv "$SR/build/config_vars.mk.tmp" "$SR/build/config_vars.mk" 
     80chmod u+rwx "$SR/build/config_vars.mk" 
    8081 
    81 sed -e "s;^#!/.*;#!$PERL;" bin/dbmmanage > $SR/bin/dbmmanage.tmp 
    82 mv $SR/bin/dbmmanage.tmp $SR/bin/dbmmanage 
     82sed -e "s;^#!/.*;#!$PERL;" bin/dbmmanage > "$SR/bin/dbmmanage.tmp" 
     83mv "$SR/bin/dbmmanage.tmp" "$SR/bin/dbmmanage" 
    8384 
    8485sed -e "s%\*\*APACHE_HOME_OS\*\*%$SR%" \ 
    85         -e "s%^HTTPD=.*$%HTTPD=\"$SR/bin/httpd -d $SR\"%" bin/apachectl > $SR/bin/apachectl.tmp 
    86 mv $SR/bin/apachectl.tmp $SR/bin/apachectl 
    87 chmod u+rwx $SR/bin/apachectl 
     86        -e "s%^HTTPD=.*$%HTTPD=\"$SR/bin/httpd -d $SR\"%" bin/apachectl > "$SR/bin/apachectl.tmp" 
     87mv "$SR/bin/apachectl.tmp" "$SR/bin/apachectl" 
     88chmod u+rwx "$SR/bin/apachectl" 
    8889 
    8990sed -e "s%\*\*APACHE_HOME_OS\*\*%$SR%" \ 
    90         bin/envvars-std > $SR/bin/envvars-std.tmp 
    91 mv $SR/bin/envvars-std.tmp $SR/bin/envvars-std 
    92 chmod u+rwx $SR/bin/envvars-std 
     91        bin/envvars-std > "$SR/bin/envvars-std.tmp" 
     92mv "$SR/bin/envvars-std.tmp" "$SR/bin/envvars-std" 
     93chmod u+rwx "$SR/bin/envvars-std" 
    9394 
    9495if [ $HAD_ENVVARS = no ] 
    9596then 
    96     cp -p $SR/bin/envvars-std $SR/bin/envvars 
     97    cp -p "$SR/bin/envvars-std" "$SR/bin/envvars" 
    9798fi 
    9899