diff options
| -rw-r--r-- | sbostuff.sh | 2 | ||||
| -rwxr-xr-x | sboul | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sbostuff.sh b/sbostuff.sh index 1bbe5ba..c4d059e 100644 --- a/sbostuff.sh +++ b/sbostuff.sh @@ -11,7 +11,7 @@ if [ -e ~/.sbostuff.cfg ]; then source ~/.sbostuff.cfg - export SBO_GITROOT SBO_NAME SBO_EMAIL SBO_GITBRANCH + export SBO_GITROOT SBO_NAME SBO_EMAIL SBO_UL_EMAIL SBO_GITBRANCH else echo "sbostuff: No ~/.sbostuff.cfg, please create one." fi @@ -37,6 +37,10 @@ sub usage { Usage: $0 -c <category> [-e <email>] [-C <comment>] [-k <keywords>] file +If no -e option is given, the value of SBO_UL_EMAIL in the environment +is used, or else SBO_EMAIL if SBO_UL_EMAIL is not set. If there's no +-e and neither variable is set, it's a fatal error. + If no -e option is given, the contents of ~/.sbo_email is used as the email address (and it's a fatal error if the file's missing). @@ -93,7 +97,7 @@ getopts('c:e:C:k:', \%opts); die_usage("Unknown junk on command line: '$junk'") if $junk; die_usage("No category (missing required -c arg)") unless $opts{c}; $category = get_category($opts{c}); -$submail = $opts{e} || $ENV{SBO_EMAIL}; +$submail = $opts{e} || $ENV{SBO_UL_EMAIL} || $ENV{SBO_EMAIL}; die_usage("No email address (use -e or else create ~/.sbostuff.cfg)") unless $submail; $comments = $opts{C} || ""; $tags = $opts{k} || ""; |
