Skip to content

Commit bf530e2

Browse files
committed
+ Added -C dir arg to sow to cd to dir before creating so I can test local changes easier.
[git-p4: depot-paths = "//src/hoe/dev/": change = 14997]
1 parent 7366be1 commit bf530e2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

bin/sow

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ end
2222

2323
def make_sub_modules klass
2424
last = nil
25-
result = ""
25+
result = []
26+
2627
klass.split("::")[0..-2].each do |part|
2728
last = [last, part].compact.join("::")
2829
result << "module #{last}; end\n"
2930
end
3031
result << "\n" unless result.empty?
32+
result.join
3133
end
3234

3335
op = OptionParser.new do |opts|
@@ -45,6 +47,10 @@ op = OptionParser.new do |opts|
4547
option[:subdir] = "dev"
4648
end
4749

50+
opts.on "-C dir", String, "Change directory to dir before creating project." do |d|
51+
Dir.chdir d
52+
end
53+
4854
opts.on("-s style", "--style style", String, "Use template <style>.") do |s|
4955
option[:style] = s
5056
end

0 commit comments

Comments
 (0)