summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 12:44:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 12:44:52 +0000
commitf64fc63cec6a9b9d55faa1fa2bef60efccc3a0dd (patch)
tree822dbbcde87fa9dc881a76de40a0935cae97f2e7 /tool
parent633df8de16203da72dff1a010740fdf92f9f7f5c (diff)
* tool/make-snapshot: add version number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot10
1 files changed, 6 insertions, 4 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index b19741de7f..3d3b43a546 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -13,13 +13,14 @@ fi
[ -d "$1" ] || mkdir "$1" || exit 1
dest=`cd "$1"; pwd`
-tmp=${TMP_DIR-/tmp}/ #ruby-snapshot-$$
+tmp="${TMP_DIR-/tmp}/ruby-snapshot-$$"
mkdir -p "$tmp"
-cd "$tmp"
+(cd "$tmp"
revision=`svn export $SVNURL ruby | sed -n '$s/[^0-9]//gp'`
[ $revision ] || revision=`svn info $SVNURL | sed -n 's/Revision: //p'`
echo "#define RUBY_REVISION $revision" > ruby/revision.h
-v=ruby-r$revision
+version=`sed -n -e '/^#define RUBY_VERSION /s/[^0-9.]//gp' ruby/version.h`
+v=ruby-$version-r$revision
mv ruby $v
(cd $v; autoconf; (sed '/lex\.c/,/^$/!d' Makefile.in; sed 's/{[^{}]*}//g' common.mk) | make -f - prereq srcdir=.)
@@ -33,4 +34,5 @@ for cmd in "bzip tarball.tar.bz2 tar cjf" "gzip tarball.tar.gz tar czf" "zip arc
echo " failed"
fi
done
-exec rm -fr $v
+exec rm -fr $v)
+exec rmdir "$tmp"