comparison extra/soundsoftware/create-repo-authormaps.rb @ 1543:05d639e5d59b feature_1136

First cut of a git export script
author Chris Cannam
date Tue, 12 Jan 2016 15:15:02 +0000
parents 60acfbd8f6d6
children fd4cc11ae096
comparison
equal deleted inserted replaced
1542:60acfbd8f6d6 1543:05d639e5d59b
16 # /var/repo-export/authormap/authormap_repo_3 16 # /var/repo-export/authormap/authormap_repo_3
17 # 17 #
18 # This script does that, if given the two directory names as arguments 18 # This script does that, if given the two directory names as arguments
19 # to the -s and -o options. In the above example: 19 # to the -s and -o options. In the above example:
20 # 20 #
21 # script/rails runner create-repo-authormaps.rb -s /var/hg -o /var/repo-export/authormap 21 # ./script/rails runner -e production extra/soundsoftware/create-repo-authormaps.rb -s /var/hg -o /var/repo-export/authormap
22 # 22 #
23 # Note that this script will overwrite any existing authormap 23 # Note that this script will overwrite any existing authormap
24 # files. (That's why the output files are given an authormap_ prefix, 24 # files. (That's why the output files are given an authormap_ prefix,
25 # so we're less likely to clobber something else if the user gets the 25 # so we're less likely to clobber something else if the user gets the
26 # arguments wrong.) 26 # arguments wrong.)
27 27
28 require 'getoptlong' 28 require 'getoptlong'
29 29
30 opts = GetoptLong.new( 30 opts = GetoptLong.new(
31 ['--scm-dir', '-s', GetoptLong::REQUIRED_ARGUMENT], 31 ['--scm-dir', '-s', GetoptLong::REQUIRED_ARGUMENT],
32 ['--out-dir', '-o', GetoptLong::REQUIRED_ARGUMENT], 32 ['--out-dir', '-o', GetoptLong::REQUIRED_ARGUMENT],
33 ['--environment', '-e', GetoptLong::REQUIRED_ARGUMENT] 33 ['--environment', '-e', GetoptLong::OPTIONAL_ARGUMENT]
34 ) 34 )
35 35
36 $repos_base = '' 36 $repos_base = ''
37 $out_base = '' 37 $out_base = ''
38 38