make local variables local

.. to not interfere with variables in the scripts that source these utils.
This commit is contained in:
root
2025-02-03 11:12:05 +01:00
parent 204162a747
commit 4c60127786
5 changed files with 18 additions and 13 deletions

View File

@@ -2,12 +2,12 @@
mailer () {
if ! [[ -z "$3" ]]; then
mailfrom="From: $3 <christian@betz.cc>"
local mailfrom="From: $3 <christian@betz.cc>"
fi
if ! [[ -z "$4" ]]; then
mailto="$4"
local mailto="$4"
elif [[ -z "$mailto" ]]; then
mailto="christian@betz.cc"
local mailto="christian@betz.cc"
fi
echo -e "$1" | mailx -s "$2" --append="$mailfrom" $mailto &>/dev/null