Sha256: 99aea979c7aef27c61ba10cf6f062475cdc6d1baf31c2bb59614cc6fb6169fe7
Contents?: true
Size: 751 Bytes
Versions: 1
Compression:
Stored size: 751 Bytes
Contents
#!/usr/bin/ruby if ARGV.include?('-h') || ARGV.include?('--help') || ARGV.length == 0 puts 'syntax: [-v] [-l or --list to only list] [-p pid] "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' end if ARGV[0] == '-l' || ARGV[0] == '--list' $VERBOSE = true # so it'll output the names... ARGV.shift After.find_pids(ARGV.shift) exit # premature exit elsif ARGV[0] == '-p' ARGV.shift pid = ARGV.shift After.wait_pid pid.to_i else After.find_and_wait_for(ARGV.shift) end puts 'running', ARGV if $VERBOSE system(*ARGV) if ARGV.length > 0
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
after-0.3.1 | bin/after |