]> git.lyx.org Git - lyx.git/commitdiff
Updates to lyx-build script.
authorRichard Heck <rgheck@lyx.org>
Sun, 4 Nov 2012 02:10:40 +0000 (22:10 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 4 Nov 2012 02:11:05 +0000 (22:11 -0400)
development/tools/lyx-build

index 971d9d2a87434479ede34ca4b9a08dd0202bb209..c86698fa9fa3c0d89c18bb106ca03e240f252022 100755 (executable)
@@ -18,7 +18,7 @@ MAKEOPTS="-j4";
 
 # Determine LyX version
 cd $SRCDIR/
-VERSION=$(head configure.ac | grep AC_INIT | perl -e 'while (<>) {m/(\d\.\d+\.\d+)/; print $1;}');
+VERSION=$(head configure.ac | grep AC_INIT | perl -e 'while (<>) {m/AC_INIT\(LyX,([^,]+)/; print $1;}');
 
 echo "This is version $VERSION.";
 echo -n "Ready to build source packages...";
@@ -86,16 +86,18 @@ if [ ! -d "$BASE/lyx-patch/" ]; then
        mkdir "$BASE/lyx-patch/" || exit 1;
 fi
 
-if [ ! -d lyx-$LAST ]; then 
+if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then 
   echo "Can't find directory for last version $LAST.";
   echo "Will try to download from LyX site....";
   read;
+  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;
   fi
+  popd;
 fi
 
 echo -n "Ready to make patch against $LAST...";
@@ -131,7 +133,9 @@ if [ -f $PATCH.gz.sig ]; then
 fi
 gpg -b $PATCH.gz
 xz -zc $PATCH > $PATCH.xz
-rm $PATCH.xz.sig;
+if [ -f $PATCH.xz.sig ]; then
+       rm $PATCH.xz.sig;
+fi
 gpg -b $PATCH.xz
 
 echo -n "Patch and signatures created...";