#!/usr/bin/env ruby # # Triggers: # ForceRmdir form-in client "ForceRmdir.rb %formfile%" if ARGV.length < 1 puts '%formfile% not given.' exit 1 end formfile = ARGV[0] form_string = "" form = File.open(formfile, 'r') form.each do |line| if /^Client:.*p4sandbox-.*$/ =~ line form.close exit 0 elsif /^Options:.*normdir.*?/ =~ line form_string << (line.sub("normdir", "rmdir")) else form_string << (line) end end form.close form = File.open(formfile, 'w') form.write(form_string) form.close exit 0
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 10138 | jim_brower | Added BSD license to ForceRmdir. | ||
#3 | 9829 | jim_brower |
Added trigger to let you force any client options you want. Not exactly proud of the implementation, but it seems to work. |
||
#2 | 9827 | jim_brower |
Fixed regular expression that checked for p4sandbox client name Eliminated use of temp file, changed are now made in a string |
||
#1 | 9825 | jim_brower | Added trigger to force rmdir client option |