forked from berhsi/rechnung
POSIX-konformisiert
This commit is contained in:
parent
4da2b81005
commit
e5df5ee85d
24
rechnung.sh
24
rechnung.sh
|
@ -167,7 +167,7 @@ check_sty() (
|
|||
|
||||
print_start "Suche nach $STY_RECHNUNG ..."
|
||||
rechnung=$(find "$STY_HOME" -type f -name "$STY_RECHNUNG")
|
||||
if [ "$rechnung" == "" ]; then
|
||||
if [ "$rechnung" = "" ]; then
|
||||
print_failed
|
||||
return 1
|
||||
else
|
||||
|
@ -239,29 +239,29 @@ install_sty() (
|
|||
|
||||
old_pwd=$(pwd)
|
||||
|
||||
read -p " LaTeX Paket $STY_RECHNUNG installieren? (y/N): "
|
||||
if [ "$REPLY" == "y" ] || [ "$REPLY" == "Y" ] || [ "$REPLY" == "j" ] || [ "$REPLY" == "J" ]
|
||||
read -r " LaTeX Paket $STY_RECHNUNG installieren? (y/N): "
|
||||
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ] || [ "$REPLY" = "j" ] || [ "$REPLY" = "J" ]
|
||||
then
|
||||
check_binaries "$GIT_BIN $LATEX_BIN"
|
||||
print_start "Hole Repo von $STY_URL ..."
|
||||
git clone $STY_URL >/dev/null 2>&1
|
||||
if [ "$?" -eq 0 ]; then
|
||||
|
||||
if git clone $STY_URL >/dev/null 2>&1; then
|
||||
print_ok
|
||||
cd rechnung
|
||||
mkdir -p "$STY_HOME/rechnung/"
|
||||
print_start "Kompiliere $STY_RECHNUNG ..."
|
||||
$LATEX_BIN rechnung.ins >/dev/null 2>&1
|
||||
if [ "$?" -eq 0 ]; then
|
||||
|
||||
if $LATEX_BIN rechnung.ins >/dev/null 2>&1; then
|
||||
print_ok
|
||||
print_start "Kopiere $STY_RECHNUNG nach $STY_HOME/rechnung ..."
|
||||
cp rechnung.sty "$STY_HOME/rechnung/"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
|
||||
if cp rechnung.sty "$STY_HOME/rechnung/"; then
|
||||
print_ok
|
||||
else
|
||||
print_failed
|
||||
exit 1
|
||||
fi
|
||||
cd $old_pwd
|
||||
cd "$old_pwd"
|
||||
rm -rf rechnung/
|
||||
print_info "Paket $STY_RECHNUNG erfolgreich installiert"
|
||||
else
|
||||
|
@ -425,9 +425,7 @@ fi
|
|||
check_binaries "$EXECUTABLES_TO_CHECK"
|
||||
check_readable "$RECHNUNGSFILE"
|
||||
check_readable "$TEMPLATEFILE"
|
||||
if check_sty "$STY_HOME"; then
|
||||
continue
|
||||
else
|
||||
if ! check_sty "$STY_HOME"; then
|
||||
print_warn "$STY_RECHNUNG nicht gefunden."
|
||||
install_sty
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue