-if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then
- echo "Can't find directory for last version $LAST.";
- echo "See if you can fix this in $BASE/lyx-patch/.";
- echo "Try that, if you like, and then we'll continue.";
- echo "We'll try to download from the LyX site if that does not work.";
- read;
-
- if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then
- echo "Will try to download from LyX site....";
- pushd $BASE/lyx-patch/;
- wget ftp://ftp.lyx.org/pub/lyx/stable/${FIRST}x/lyx-$LAST.tar.gz;
- tar -zxvf lyx-$LAST.tar.gz;
- if [ ! -f lyx-$LAST.tar.gz ]; then
- echo "Still unable to find directory for last version $LAST.";
- exit 1;
+if [ ! -d "$BASE/lyx-patch/lyx-$LAST" ]; then
+ echo "Can't find directory for last version $LAST.";
+ echo "See if you can fix this in $BASE/lyx-patch/.";
+ echo "Try that, if you like, and then we'll continue.";
+ echo "We'll try to download from the LyX site if that does not work.";
+ read;
+
+ if [ -z "$DEBUG" ]; then
+ if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then
+ echo "Will try to download from LyX site....";
+ pushd "$BASE/lyx-patch/";
+ wget ftp://ftp.lyx.org/pub/lyx/stable/${FIRST}x/lyx-$LAST.tar.gz;
+ wget ftp://ftp.lyx.org/pub/lyx/stable/${FIRST}x/lyx-$LAST.tar.gz.sig
+ gpg -q --verify lyx-$LAST.tar.gz.sig
+ if ! [ $? == 0 ]; then
+ echo "Signature wrong!"
+ exit 1;
+ fi
+ rm lyx-$LAST.tar.gz.sig
+ tar -zxvf lyx-$LAST.tar.gz;
+ if [ ! -f lyx-$LAST.tar.gz ]; then
+ echo "Still unable to find directory for last version $LAST.";
+ exit 1;
+ fi
+ $DEBUG popd;
+ fi