summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 11:24:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 11:24:50 +0000
commita99c3a6e9d0ff69e08602061d7a24b3a2ffbe424 (patch)
tree51e92024c58210b3e1a8a7f259b4549f690c1e6b /tool
parent7847c1b860cd634aa88e15ee5b7a81e3a8eb182c (diff)
* tool/make-snapshot: argument check, and cleanup exported directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot5
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 957c3e8b46..b19741de7f 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -6,6 +6,10 @@ export LC_ALL LANG
: ${VPATH=include/ruby} ${YACC=bison} ${BASERUBY=ruby} ${RUBY=ruby} ${MV=mv}
export VPATH YACC BASERUBY RUBY MV
+if [ ! "$1" ]; then
+ echo usage: `basename $0` new-directory-to-save 1>&2
+ exit 1
+fi
[ -d "$1" ] || mkdir "$1" || exit 1
dest=`cd "$1"; pwd`
@@ -29,3 +33,4 @@ 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