Sha256: fe031a8aa936acdc565e20e9ce3cc15cbd5e277999b829d1dd9c47710c2c665a

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

#!/usr/bin/ruby

if ['-h', '--help'].in?(ARGV) || ARGV.length == 0
  puts 'syntax: [-v] [-l or --list to only list] "command string to match" then some other command to run with its args'
  exit
end

require 'after'
require 'andand' # to avoid warnings

if ARGV[0] == '-v'
  ARGV.shift
  $VERBOSE = true
  puts 'running in verbose mode, my pid is ' + Process.pid.to_s
end

if ARGV[0] == '-l' || ARGV[0] == '--list'
  $VERBOSE = true # so it'll output
  ARGV.shift
  After.find_pids(ARGV.shift)
  exit
end

After.find_and_wait_for(ARGV.shift)
system(ARGV)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
after-0.1.0 bin/after
after-0.0.4 bin/after