summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk4
1 files changed, 3 insertions, 1 deletions
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