Das local-Builtin ist ein Bashismus.

This commit is contained in:
qbi 2021-05-03 21:41:53 +02:00
parent f55129a6dd
commit 58a98bd5ea

View file

@ -82,8 +82,8 @@ check_readable() {
check_binaries() {
local program=""
local binaries=$*
program=""
binaries=$*
for program in $binaries; do
printf "\n[+] Suche nach Programm $program ..."
@ -99,7 +99,7 @@ check_binaries() {
is_option() (
local line="$*"
line="$*"
if [ "${line#*=}" != "$line" ]; then
return 0
@ -131,7 +131,7 @@ print_ok() {
print_warn() {
local msg=$*
msg=$*
if [ "$COLORED_OUTPUT" -eq 1 ]; then
echo -e "$YELLOW[-]$NORMAL $msg"
@ -187,8 +187,8 @@ reset_values() {
set_value() {
local key=$(echo "$*" | $CUT_BIN -d "=" -f1)
local value=$(echo "$*" | $CUT_BIN -d "=" -f2)
key=$(echo "$*" | $CUT_BIN -d "=" -f1)
value=$(echo "$*" | $CUT_BIN -d "=" -f2)
trim_key $key
trim_value $value
@ -207,20 +207,20 @@ set_value() {
make_invoice() {
local dead_days="14"
dead_days="14"
if [ $(date +%u) -gt 5 ]; then
dead_days="16"
fi
local month_ascii=$(date '+%B')
local inv_day=$(date '+%j')
local inv_date=$(date '+%Y%m%d')
local inv_dead=$(date -d "+${dead_days}days" '+%d.\\\\,%m.\\\\,%Y')
local rechnungsnummer="$inv_date--$LFDNR"
local subject="Rechnung zu $SHORT"
local filename="$(date '+%Y%m%d')_Rechnung_$(echo "$month_ascii")_$(echo "$KUNDE" | $TR_BIN " " "_").ltx"
local buffer="$KUNDE; $ADRESSE"
local anschrift="$(echo "$buffer" | sed 's/; /\\\\\\\\\\\\\\ /g')"
month_ascii=$(date '+%B')
inv_day=$(date '+%j')
inv_date=$(date '+%Y%m%d')
inv_dead=$(date -d "+${dead_days}days" '+%d.\\\\,%m.\\\\,%Y')
rechnungsnummer="$inv_date--$LFDNR"
subject="Rechnung zu $SHORT"
filename="$(date '+%Y%m%d')_Rechnung_$(echo "$month_ascii")_$(echo "$KUNDE" | $TR_BIN " " "_").ltx"
buffer="$KUNDE; $ADRESSE"
anschrift="$(echo "$buffer" | sed 's/; /\\\\\\\\\\\\\\ /g')"
echo "[+] Erstelle Rechnung: $filename"
echo -n "s!#SUBJECT#!" >$SEDFILE; echo "$subject!" >>$SEDFILE
@ -247,8 +247,8 @@ make_invoice() {
proced_ini_line() {
local line=$*
local first=$(echo "$line" | cut -c1-1)
line=$*
first=$(echo "$line" | cut -c1-1)
# leerzeilen ignorieren
if [ "$line" = "" ]; then