summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 04:37:58 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 04:37:58 (GMT)
commit913ed016c1efa45afd78c6c56484bbdd0fde9454 (patch)
tree0a55a360a971cd7c8531f0d07115266876170b1b /common.mk
parent25661ef5adedb311196e39b7f924cdccfa239011 (diff)
common.mk: remove old gems
* common.mk (update-gems): remove old version gems after successfully downloaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 996ade9..20f5c70 100644
--- a/common.mk
+++ b/common.mk
@@ -893,8 +893,10 @@ update-gems: PHONY
$(Q) $(RUNRUBY) -C "$(srcdir)/gems" \
-I../tool -rdownloader -answ \
-e 'gem, ver = *$$F' \
+ -e 'old = Dir.glob("#{gem}-*.gem")' \
-e 'gem = "#{gem}-#{ver}.gem"' \
- -e 'Downloader::RubyGems.download(gem, nil, nil)' \
+ -e 'Downloader::RubyGems.download(gem, nil, nil) and' \
+ -e 'File.unlink(*(old-[gem]))' \
bundled_gems
UPDATE_LIBRARIES = no