fehlerhaftes exit entfernt, hilfe und option -f hinzugefügt
This commit is contained in:
parent
e5df5ee85d
commit
7331d31bcf
18
rechnung.sh
18
rechnung.sh
|
@ -399,6 +399,11 @@ proced_ini_line() {
|
|||
fi
|
||||
}
|
||||
|
||||
display_help() (
|
||||
|
||||
echo "Usage: rechnung.sh [-f rechnungsfile] [-h]"
|
||||
)
|
||||
|
||||
quit() {
|
||||
printf "\n"
|
||||
printf "%s" "$BLUE"
|
||||
|
@ -409,6 +414,16 @@ quit() {
|
|||
# --- Programmstart --- #
|
||||
# --------------------- #
|
||||
|
||||
# CLI Optionen auswerten
|
||||
while getopts f:h opt
|
||||
do
|
||||
case $opt in
|
||||
f) RECHNUNGSFILE=$OPTARG;;
|
||||
h) display_help; exit 0;;
|
||||
*) display_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Verschiedene Basic Checks
|
||||
if [ -n "$NUMBER_OF_COLORS" ] && [ "$NUMBER_OF_COLORS" -ge 8 ]; then
|
||||
COLORED_OUTPUT=1
|
||||
|
@ -430,9 +445,6 @@ if ! check_sty "$STY_HOME"; then
|
|||
install_sty
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
|
||||
# Kundendatei einlesen und rechnungen erstellen
|
||||
while IFS= read -r rawline
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue