aboutsummaryrefslogtreecommitdiffstats
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
commit7216e778978bcb9a50170bb8ba1748319d0e85f6 (patch)
treef1b298fd707ffac749bcea2bd47234407f994425 /common.mk
parent033beeb68a73ae7ff7c8d1644d27939aedabe3a5 (diff)
downloadruby-7216e778978bcb9a50170bb8ba1748319d0e85f6.tar.gz
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