Skip to content
Paul Moeller edited this page Oct 30, 2014 · 2 revisions

ShellUtil

  • bivio: one shell script (to rule them all :-)
#!/usr/bin/perl -w
use strict;
use Bivio::ShellUtil;
Bivio::ShellUtil->required_main(@ARGV);
  • first shell argument specifies a module name (looked up by our ClassLoader)

  • second shell argument specifies a method on that module

  • any following arguments are passed into the method

  • standard flags for setting realms, users, input, output, and similar

  • (did we mention that we use perl for everything)

$ bivio Copy 
ERROR: missing command
usage: projex-copy [options] command [args...]
commands:
    to RootPkg pfx legal-name [[facade-uri] [prod-domain] -- creates a new project
options:
    -db - name of database connection
    -detach - calls detach process before executing command
    -detach_log - log file to use when detached
    -email - who to mail the results to (may be a comma separated list)
    -force - don't ask "are you sure?"
    -input - a file to read from ("-" is STDIN)
    -live - don't die on errors (used in weird circumstances)
    -noexecute - don't commit
    -output - a file to write the output to ("-" is STDOUT)
    -realm - realm_id or realm name
    -user - user_id or user name

some interesting ShellUtils

  reset_password()
  join_user()
  leave_user()
  users()
  realms()
Clone this wiki locally