leere downloads werden automatisch geloescht
Downloads, deren Verifikation fehlschlaegt, werden automatisch geloescht tidy laesst sich per Hand als Syntax-Pruefung einschalten
This commit is contained in:
parent
bbdf670c06
commit
0db47ee6e3
2 changed files with 22 additions and 6 deletions
|
@ -1,5 +1,10 @@
|
||||||
# validation program
|
# validation program
|
||||||
VALIDATE_BIN := validate
|
VALIDATE_BIN := validate
|
||||||
|
VALIDATE_OPTS :=
|
||||||
|
# alternativ kann auch ein anderes Pruef-Programm verwendet werden - tidy kann
|
||||||
|
# aber wohl nicht daran gehindert werden, unwichtige Nachrichten auszugeben
|
||||||
|
#VALIDATE_BIN := tidy
|
||||||
|
#VALIDATE_OPTS := -o /dev/null -errors -quiet
|
||||||
# our self written documents
|
# our self written documents
|
||||||
LYX_FILES := $(shell find . -name *.lyx -type f)
|
LYX_FILES := $(shell find . -name *.lyx -type f)
|
||||||
# the tex output of lyx
|
# the tex output of lyx
|
||||||
|
@ -43,7 +48,7 @@ validate: $(EXPORT_DIRS)
|
||||||
echo >&2 ;\
|
echo >&2 ;\
|
||||||
false ;\
|
false ;\
|
||||||
fi
|
fi
|
||||||
@$(VALIDATE_BIN) $(shell find . -name *.html -type f)
|
@$(VALIDATE_BIN) $(VALIDATE_OPTS) $(shell find . -name *.html -type f) ;\
|
||||||
|
|
||||||
|
|
||||||
# copy the created files to the destination directory (usually outside of this directory tree)
|
# copy the created files to the destination directory (usually outside of this directory tree)
|
||||||
|
|
|
@ -12,7 +12,11 @@ KEY_SERVERS="x-hkp://pgp.mit.edu --keyserver hkp://subkeys.pgp.net"
|
||||||
function download_file()
|
function download_file()
|
||||||
{
|
{
|
||||||
local QUELLE=$(grep "^$1[[:space:]]" $URL_FILE | cut -f 2)
|
local QUELLE=$(grep "^$1[[:space:]]" $URL_FILE | cut -f 2)
|
||||||
wget --continue --output-document "$DEST_DIR/$1" "$QUELLE"
|
local ZIEL=$DEST_DIR/$1
|
||||||
|
# leider sind die exitcodes von wget derzeit noch nicht zuverlaessig (< v1.11)
|
||||||
|
wget --continue --output-document "$ZIEL" "$QUELLE"
|
||||||
|
# loesche die Datei, falls sie existiert jedoch leer ist
|
||||||
|
test -e "$ZIEL" -a ! -s "$ZIEL" && rm "$ZIEL"
|
||||||
}
|
}
|
||||||
|
|
||||||
function verify_file()
|
function verify_file()
|
||||||
|
@ -31,11 +35,18 @@ function verify_file()
|
||||||
[ ! -e "$SIG_FILE" ] && wget --output-document "$SIG_FILE" "$SIG_URL"
|
[ ! -e "$SIG_FILE" ] && wget --output-document "$SIG_FILE" "$SIG_URL"
|
||||||
# pruefen - notfalls den Schluessel importieren
|
# pruefen - notfalls den Schluessel importieren
|
||||||
# erstmal Ausgabe unterdruecken
|
# erstmal Ausgabe unterdruecken
|
||||||
if gpg --quiet --keyserver $KEY_SERVERS --keyserver-options auto-key-retrieve --verify "$SIG_FILE" "$DEST_DIR/$1" &>/dev/null
|
if gpg --quiet --keyserver $KEY_SERVERS --keyserver-options auto-key-retrieve \
|
||||||
|
--verify "$SIG_FILE" "$DEST_DIR/$1" &>/dev/null
|
||||||
then return 0
|
then return 0
|
||||||
else gpg --quiet --keyserver $KEY_SERVERS --keyserver-options auto-key-retrieve --verify "$SIG_FILE" "$DEST_DIR/$1"
|
else # nochmal - diesmal mit Fehlerausgabe
|
||||||
# do it again (with output), if verification failed
|
gpg --quiet --keyserver $KEY_SERVERS --keyserver-options auto-key-retrieve \
|
||||||
return 1
|
--verify "$SIG_FILE" "$DEST_DIR/$1"
|
||||||
|
# loesche die heruntergeladene Datei und die Signatur falls die
|
||||||
|
# Verifikation fehlschlaegt
|
||||||
|
rm "$DEST_DIR/$1" "$SIG_FILE"
|
||||||
|
echo "Die heruntergeladene Datei und die Signatur-Datei wurden geloescht."
|
||||||
|
echo "Versuche es nochmal ..."
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue