зеркало из https://github.com/mislav/hub.git
standalone bundler
This commit is contained in:
Родитель
15616e6b0e
Коммит
fa0889c1d0
|
@ -7,7 +7,7 @@ knowledge.
|
|||
It can used on its own or can serve as a complete, backwards
|
||||
compatible replacement for the `git` script.
|
||||
|
||||
Standalone:
|
||||
Normal:
|
||||
|
||||
$ hub clone rtomayko/tilt
|
||||
Initialized empty Git repository in /Users/chris/sandbox/tilt/.git/
|
||||
|
@ -31,6 +31,11 @@ Aliased:
|
|||
Install
|
||||
-------
|
||||
|
||||
hub can be installed most easily as a stand alone script:
|
||||
|
||||
curl http://defunkt.github.com/hub/standalone > ~/bin/hub && chmod 0755 !$
|
||||
|
||||
|
||||
hub can be installed using rubygems:
|
||||
|
||||
$ gem install hub -s http://gemcutter.org/
|
||||
|
|
28
Rakefile
28
Rakefile
|
@ -8,6 +8,34 @@ Rake::TestTask.new do |t|
|
|||
t.verbose = false
|
||||
end
|
||||
|
||||
module Standalone
|
||||
PREAMBLE = <<-premable
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# This file, hub, is generated code.
|
||||
# Please DO NOT EDIT or send patches for it.
|
||||
#
|
||||
# Please take a look at the source from
|
||||
# http://github.com/defunkt/hub
|
||||
# and submit patches against the individual files
|
||||
# that build hub.
|
||||
#
|
||||
|
||||
premable
|
||||
POSTAMBLE = "Hub::Runner.execute(*ARGV)"
|
||||
end
|
||||
|
||||
desc "Build standalone script"
|
||||
task :standalone => :test do
|
||||
File.open('hub-standalone', 'w') do |f|
|
||||
f.puts Standalone::PREAMBLE
|
||||
Dir['lib/*/**'].each do |file|
|
||||
f.puts File.read(file)
|
||||
end
|
||||
f.puts Standalone::POSTAMBLE
|
||||
end
|
||||
end
|
||||
|
||||
desc "Launch Kicker (like autotest)"
|
||||
task :kicker do
|
||||
puts "Kicking... (ctrl+c to cancel)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче