build-scripts/snapshot.sh
changeset 5019 64a2d8f538a1
parent 2986 bb773ff79106
equal deleted inserted replaced
5018:342b158efbbe 5019:64a2d8f538a1
     1 #!/bin/sh
     1 #!/bin/sh
     2 #
     2 #
     3 # Generate a current snapshot from source control
     3 # Generate a current snapshot from source control
     4 
     4 
     5 echo "Checking out source"
     5 echo "Checking out source"
     6 svn co -q http://svn.libsdl.org/trunk/SDL
     6 hg clone http://hg.libsdl.org/SDL || exit $?
     7 (cd SDL && ./autogen.sh && rm -rf autom4te.cache)
     7 (cd SDL && ./autogen.sh && rm -rf autom4te.cache)
     8 sh SDL/build-scripts/updaterev.sh
     8 sh SDL/build-scripts/updaterev.sh
     9 cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
     9 cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
    10 
    10 
    11 major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
    11 major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
    13 minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
    13 minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
    14        sed 's,[^0-9]*\([0-9]*\),\1,'`
    14        sed 's,[^0-9]*\([0-9]*\),\1,'`
    15 patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
    15 patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
    16        sed 's,[^0-9]*\([0-9]*\),\1,'`
    16        sed 's,[^0-9]*\([0-9]*\),\1,'`
    17 rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
    17 rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
    18        sed 's,[^0-9]*\([0-9]*\),\1,'`
    18        sed 's,[^0-9]*\([0-9]*\):.*,\1,'`
    19 path="SDL-$major.$minor.$patch-$rev"
    19 path="SDL-$major.$minor.$patch-$rev"
    20 
    20 
    21 mv SDL $path
    21 mv SDL $path
    22 echo $path.tar.gz
    22 echo $path.tar.gz
    23 tar zcf $path.tar.gz $path
    23 tar zcf $path.tar.gz $path
    24 echo $path.zip
    24 echo $path.zip
    25 rm -f $path.zip
    25 rm -f $path.zip
    26 zip -rq $path.zip $path
    26 zip -rq $path.zip $path
    27 rm -rf $path
    27 rm -rf $path
    28 
       
    29 #ln -sf $path.tar.gz SDL-1.3.tar.gz
       
    30 #ln -sf $path.zip SDL-1.3.zip
       
    31 #date=`date +"%a %b %e"`
       
    32 #sed -e "s/<-- SDL 1.3 DATE -->.*/<-- SDL 1.3 DATE --> $date/" <../svn.php >../svn.php.new
       
    33 #mv ../svn.php.new ../svn.php