build-scripts/updaterev.sh
changeset 6994 06f368666c6f
parent 5359 d5fe4ed3a28d
equal deleted inserted replaced
6993:33f1e384ed56 6994:06f368666c6f
     8 header=$outdir/include/SDL_revision.h
     8 header=$outdir/include/SDL_revision.h
     9 
     9 
    10 rev=`sh showrev.sh 2>/dev/null`
    10 rev=`sh showrev.sh 2>/dev/null`
    11 if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then
    11 if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then
    12     revnum=`echo $rev | sed 's,hg-\([0-9]*\).*,\1,'`
    12     revnum=`echo $rev | sed 's,hg-\([0-9]*\).*,\1,'`
    13     echo "#define SDL_REVISION \"$rev\"" >$header.new
    13     echo "#define SDL_REVISION \"$rev\"" >"$header.new"
    14     echo "#define SDL_REVISION_NUMBER $revnum" >>$header.new
    14     echo "#define SDL_REVISION_NUMBER $revnum" >>"$header.new"
    15     if diff $header $header.new >/dev/null 2>&1; then
    15     if diff $header $header.new >/dev/null 2>&1; then
    16         rm $header.new
    16         rm "$header.new"
    17     else
    17     else
    18         mv $header.new $header
    18         mv "$header.new" "$header"
    19     fi
    19     fi
    20 fi
    20 fi