summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-25 14:25:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-25 14:25:39 +0000
commitb1dc6071846a466b37b3af94600b3609080d1c92 (patch)
treef1b298fd707ffac749bcea2bd47234407f994425 /common.mk
parent09ea07e02c96135ed58831ce4216db82e4233c43 (diff)
common.mk: remove old gems at update-gems
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 2fa479fa9b..5ca7af5d13 100644
--- a/common.mk
+++ b/common.mk
@@ -1131,10 +1131,11 @@ update-gems: PHONY
$(Q) $(BASERUBY) -C "$(srcdir)" \
-I./tool -rdownloader -answ \
-e 'gem, ver = *$$F' \
- -e 'old = Dir.glob("#{gem}-*.gem")' \
+ -e 'old = Dir.glob("gems/#{gem}-*.gem")' \
-e 'gem = "#{gem}-#{ver}.gem"' \
-e 'Downloader::RubyGems.download(gem, "gems", nil) and' \
- -e 'File.unlink(*(old-[gem]))' \
+ -e 'old.delete("gems/#{gem}") and' \
+ -e 'File.unlink(*old) and FileUtils.rm_rf(old.map{|n|n.chomp(".gem")})' \
gems/bundled_gems
extract-gems: PHONY