From 50325b356e0e84af8fe9f5d01c203b8b3014ab78 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 10 Sep 2026 06:37:33 -0400 Subject: sboul: allow SBO_UL_EMAIL override in env. --- sbostuff.sh | 2 +- 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 diff --git a/sboul b/sboul index 646dd63..5a001c1 100755 --- a/sboul +++ b/sboul @@ -37,6 +37,10 @@ sub usage { Usage: $0 -c [-e ] [-C ] [-k ] 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} || ""; -- cgit v1.2.3