diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-22 15:41:52 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-22 15:41:52 -0700 |
commit | a81350f6559a59921443d9773eccc9f8cfd96ee1 (patch) | |
tree | b7641fdf7c3b907a9d4d5d8d96c34cb9ee66b73f /scripts | |
parent | c9ca46f7c125b7a012f8bc85b9a37f1ae7468c77 (diff) |
functions to check options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/commandline.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/commandline.inc b/scripts/commandline.inc index 292005dca..8da42873a 100644 --- a/scripts/commandline.inc +++ b/scripts/commandline.inc @@ -105,3 +105,27 @@ END_OF_DEFAULT; } require_once INSTALLDIR . '/lib/common.php'; + +set_error_handler('common_error_handler'); + +function have_option($str) +{ + global $options; + foreach ($options as $option) { + if ($option[0] == $str) { + return true; + } + } + return false; +} + +function get_option_value($str) +{ + global $options; + foreach ($options as $option) { + if ($option[0] == $str) { + return $option[1]; + } + } + return null; +}
\ No newline at end of file |