Created
July 24, 2014 12:44
-
-
Save krimdomu/98086b9629ba815bbfc5 to your computer and use it in GitHub Desktop.
check if we are running in a batch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task "one", sub { | |
if(in_batch()) { | |
say "in batch"; | |
} | |
}; | |
task "two", sub {}; | |
sub in_batch { | |
return Rex::Args->is_opt('b'); | |
} | |
batch b1 => "one", "two"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment