Sha256: 22977f0e2725974d2c4ddbeebc7316ec21dba3af1f0a9da8a193026b3a32a70f

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

#!/usr/bin/ruby
require 'optparse'

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'lockit'

options = {}

optparse = OptionParser.new do |opts|
   opts.banner = "Usage: lockit [options] [dir]"

   # This displays the help screen, all programs are
   # assumed to have this option.
   opts.on( '-h', '--help', 'Display this screen' ) do
     puts opts
     exit
   end
end

optparse.parse!

options[:dir] = ARGV.shift
options[:dir] ||= Dir.pwd

response = LockIt::Dir.new(options[:dir]).lock

exit 1 unless response

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lockit-0.1.2 bin/lockit
lockit-0.1.1 bin/lockit
lockit-0.0.0 bin/lockit