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