installation von rechnung.sty nicht mehr interaktiv

This commit is contained in:
+++ 2021-06-02 23:20:52 +02:00
parent 3786fe767a
commit c2484f3015
2 changed files with 33 additions and 28 deletions

View file

@ -30,6 +30,12 @@ Optionen
Die Kundendaten werden aus 'kundendatei' gelesen.
-i
Installiert bei Bedarf das Latex-Paket rechnung.sty. Das Paket wird aus
dem Repo geklont, mittels latex gebaut und in das Verzeichnis
$HOME/texmf/latex/tex/rechnung/ kopiert.
-l lco-datei
Verwendet 'lco-datei' für verschiedene Variablen des Absenders.

View file

@ -59,6 +59,7 @@ RECHNUNGSFILE="rechnung.ini"
TEMPLATEFILE="template.ltx"
LCOFILE="absender.lco"
LCO=$(basename $LCOFILE .lco)
INSTALL_LCO_FILE=0
SEDFILE="sed.txt"
LINE_BUFFER=""
KEY_BUFFER=""
@ -275,9 +276,6 @@ install_sty() (
old_pwd=$(pwd)
printf " LaTeX Paket '%s' installieren? (y/N): " $STY_RECHNUNG; read -r REPLY
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ] || [ "$REPLY" = "j" ] || [ "$REPLY" = "J" ]
then
check_binaries "$GIT_BIN $LATEX_BIN"
print_start "Hole Repo von $STY_URL ..."
@ -308,10 +306,6 @@ install_sty() (
print_error "Klonen des Repos fehlgeschlagen"
exit 6
fi
else
print_info "Beende Progrann"
exit 7
fi
)
# wenn ein neuer Kunde beginnt, alle Variablen neu initialisieren
@ -462,6 +456,7 @@ do
case $opt in
f) RECHNUNGSFILE=$OPTARG;;
h) display_help; exit 0;;
i) INSTALL_LCO_FILE=1;;
l) LCOFILE=$OPTARG;;
q) VERBOSITY=0;;
v) display_version; exit 0;;
@ -488,7 +483,11 @@ check_readable "$TEMPLATEFILE"
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")
else
install_sty
fi
fi
# Kundendatei einlesen und rechnungen erstellen