From 913ed016c1efa45afd78c6c56484bbdd0fde9454 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Nov 2014 04:37:58 +0000 Subject: 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 --- common.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common.mk') diff --git a/common.mk b/common.mk index 996ade97bb..20f5c70bc3 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 -- cgit v1.2.3