summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-06-14 13:10:58 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-15 12:37:37 +0900
commitf5f6415f264400e44888afb9335f76bd46e3f69d (patch)
tree9f7879065100e3280eef207c87f8d13f0fad445a
parent93e6fa1d319d19ce7fba37e4b9924862447b9f38 (diff)
A help message to `tool/sync_default_gems.rb`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3223
-rw-r--r--tool/sync_default_gems.rb23
1 files changed, 15 insertions, 8 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index cf03d58168..4605bf9aea 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -1,13 +1,5 @@
# sync following repositories to ruby repository
#
-# Usage:
-# git clone from the upstream repository and copy from the upstream repository with cp -rf. It's lost the git commits.
-# $ ruby tool/sync_default_gems.rb rubygems
-# pick the single commit from the upstream repository.
-# $ ruby tool/sync_default_gems.rb rubygems 97e9768612
-# pick the commits range from the upstream repository
-# $ ruby tool/sync_default_gems.rb rubygems 97e9768612..9e53702832
-#
# * https://github.com/rubygems/rubygems
# * https://github.com/ruby/rdoc
# * https://github.com/ruby/reline
@@ -466,6 +458,21 @@ when "up"
end
when "all"
$repositories.keys.each{|gem| sync_default_gems(gem.to_s)}
+when nil, "-h", "--help"
+ puts <<-HELP
+\e[1mSync with upstream code of default libraries\e[0m
+
+\e[1mImport a default library through `git clone` and `cp -rf` (git commits are lost)\e[0m
+ ruby #$0 rubygems
+
+\e[1mPick a single commit from the upstream repository\e[0m
+ ruby #$0 rubygems 97e9768612
+
+\e[1mPick a commit range from the upstream repository\e[0m
+ ruby #$0 rubygems 97e9768612..9e53702832
+ HELP
+
+ exit
else
if ARGV[1]
sync_default_gems_with_commits(ARGV[0], ARGV[1])