[前][次][番号順一覧][スレッド一覧]

ruby-changes:48316

From: nobu <ko1@a...>
Date: Wed, 25 Oct 2017 23:25:45 +0900 (JST)
Subject: [ruby-changes:48316] nobu:r60430 (trunk): common.mk: remove old gems at update-gems

nobu	2017-10-25 23:25:39 +0900 (Wed, 25 Oct 2017)

  New Revision: 60430

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60430

  Log:
    common.mk: remove old gems at update-gems

  Modified files:
    trunk/common.mk
Index: common.mk
===================================================================
--- common.mk	(revision 60429)
+++ common.mk	(revision 60430)
@@ -1131,10 +1131,11 @@ update-gems: PHONY https://github.com/ruby/ruby/blob/trunk/common.mk#L1131
 	$(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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]