fehlerausgabe verbessert, kleine korrekturen
wenn das kompilieren fehlschlägt wird im log nach fehlermeldungen gesucht und diese ausgegeben. ein - nach /bin/sh verhindert parameterübergaben. ifs wird explitiet gesetzt.
This commit is contained in:
parent
c2484f3015
commit
c43c2cb7a1
14
rechnung.sh
14
rechnung.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -
|
||||
|
||||
# file: rechnung.sh
|
||||
# date: 02.05.2021
|
||||
|
@ -13,6 +13,9 @@ set -e
|
|||
# ein paar Sicherheitsvorkehrungen
|
||||
# --------------------------------
|
||||
|
||||
OLDIFS=$IFS
|
||||
IFS='
'
|
||||
|
||||
unset -f command
|
||||
unset -f unalias
|
||||
\unalias -a
|
||||
|
@ -383,9 +386,11 @@ make_invoice() {
|
|||
$SED_BIN -i -f "$SEDFILE" "$filename"
|
||||
|
||||
if ! $GENPDF "$filename" 1>&2 >/dev/null; then
|
||||
print_error "Rechnung fehlgeschlagen"
|
||||
print_error "Kompilierung von $filename fehlgeschlagen"
|
||||
logfile=$(echo "$filename" | sed -e s/ltx/log/)
|
||||
print_error "$(grep "Error" $logfile)"
|
||||
else
|
||||
print_info "Rechnung erfolgreich erstellt"
|
||||
print_info "Rechnung $filename erfolgreich erstellt"
|
||||
fi
|
||||
|
||||
if [ -x "$RUBBER_BIN" ]; then
|
||||
|
@ -484,7 +489,7 @@ check_readable "$LCOFILE"
|
|||
if ! check_sty "$STY_HOME"; then
|
||||
print_warn "$STY_RECHNUNG nicht gefunden."
|
||||
if [ $INSTALL_LCO_FILE -eq 0 ]; then
|
||||
print_info("Beende $PROGRAMM_NAME")
|
||||
print_info "Beende $PROGRAMM_NAME"
|
||||
else
|
||||
install_sty
|
||||
fi
|
||||
|
@ -497,4 +502,3 @@ do
|
|||
proced_ini_line "$LINE_BUFFER"
|
||||
done < "$RECHNUNGSFILE"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue