Fix bug 1574 - updaterev.sh fails when path contains spaces
authorAndreas Schiffler
Sun, 10 Mar 2013 16:28:20 -0700
changeset 699406f368666c6f
parent 6993 33f1e384ed56
child 6995 7c87aa0a189f
Fix bug 1574 - updaterev.sh fails when path contains spaces
build-scripts/updaterev.sh
     1.1 --- a/build-scripts/updaterev.sh	Sun Mar 10 13:36:20 2013 -0400
     1.2 +++ b/build-scripts/updaterev.sh	Sun Mar 10 16:28:20 2013 -0700
     1.3 @@ -10,11 +10,11 @@
     1.4  rev=`sh showrev.sh 2>/dev/null`
     1.5  if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then
     1.6      revnum=`echo $rev | sed 's,hg-\([0-9]*\).*,\1,'`
     1.7 -    echo "#define SDL_REVISION \"$rev\"" >$header.new
     1.8 -    echo "#define SDL_REVISION_NUMBER $revnum" >>$header.new
     1.9 +    echo "#define SDL_REVISION \"$rev\"" >"$header.new"
    1.10 +    echo "#define SDL_REVISION_NUMBER $revnum" >>"$header.new"
    1.11      if diff $header $header.new >/dev/null 2>&1; then
    1.12 -        rm $header.new
    1.13 +        rm "$header.new"
    1.14      else
    1.15 -        mv $header.new $header
    1.16 +        mv "$header.new" "$header"
    1.17      fi
    1.18  fi