aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-09-10 06:37:33 -0400
committerB. Watson <urchlay@slackware.uk>2026-09-10 06:37:33 -0400
commit50325b356e0e84af8fe9f5d01c203b8b3014ab78 (patch)
tree066e519289f122c6e6f0d44811abdcc3f8428bf7
parent9826aa3722068fec024af2977f675416e9a99d92 (diff)
downloadsbostuff-50325b356e0e84af8fe9f5d01c203b8b3014ab78.tar.gz
sboul: allow SBO_UL_EMAIL override in env.
-rw-r--r--sbostuff.sh2
-rwxr-xr-xsboul6
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 <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} || "";