Variablen quoten

This commit is contained in:
qbi 2021-06-06 10:04:24 +02:00
parent bf2ca2c96b
commit df55d17113

View file

@ -53,7 +53,7 @@ fi
# Variablen definieren # Variablen definieren
# -------------------- # --------------------
PROGRAMM_NAME=$(basename $0) PROGRAMM_NAME=$(basename "$0")
PROGRAMM_VERSION="0.0.1" PROGRAMM_VERSION="0.0.1"
VERBOSITY=1 VERBOSITY=1
STY_HOME="$HOME/texmf/tex/latex" STY_HOME="$HOME/texmf/tex/latex"
@ -197,7 +197,7 @@ print_error() {
failed_and_exit() { failed_and_exit() {
print_failed print_failed
exit $* exit "$*"
} }
# Diverse Checks # Diverse Checks
@ -255,7 +255,7 @@ check_binaries() (
quit 3 quit 3
else else
if [ -h "$program" ]; then if [ -h "$program" ]; then
program=$(get_link_target $program) program=$(get_link_target "$program")
fi fi
if ! which "$program" 2>&1 >/dev/null; then if ! which "$program" 2>&1 >/dev/null; then
print_failed "$program ist nicht im Pfad" print_failed "$program ist nicht im Pfad"
@ -274,7 +274,7 @@ get_link_target() (
program=$1 program=$1
while [ -h "$program" ]; do while [ -h "$program" ]; do
program=$(readlink $program) program=$(readlink "$program")
done done
echo "$program" echo "$program"
) )
@ -482,7 +482,7 @@ make_invoice() (
if ! $GENPDF "$filename" 1>&2 >/dev/null; then if ! $GENPDF "$filename" 1>&2 >/dev/null; then
print_error "Kompilierung von $filename fehlgeschlagen" print_error "Kompilierung von $filename fehlgeschlagen"
logfile=$(echo "$filename" | sed -e s/ltx/log/) logfile=$(echo "$filename" | sed -e s/ltx/log/)
print_error "$(grep "Error" $logfile)" print_error "$(grep "Error" "$logfile")"
else else
print_info "Rechnung $filename erfolgreich erstellt" print_info "Rechnung $filename erfolgreich erstellt"
fi fi