Guest User

Untitled

a guest
Apr 27th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. PROJECT_NAME = ARGV[0]
  4. BASE_DIR = ENV['BASE_DIR'] || File.expand_path("~/dev/projects/general")
  5.  
  6. if PROJECT_NAME.nil? or PROJECT_NAME.strip.empty?
  7. puts "Usage: share_git_repo <repo name>\nThis repo must be in your base directory which is set to #{BASE_DIR}"
  8. else
  9. `git-daemon --reuseaddr --verbose --export-all --base-path=#{BASE_DIR} -- #{BASE_DIR}/#{PROJECT_NAME}/.git`
  10. end
Add Comment
Please, Sign In to add comment