]> git.lyx.org Git - features.git/commitdiff
Make the cropping work and then turn it off by default.
authorAngus Leeming <leeming@lyx.org>
Mon, 8 Jul 2002 12:50:49 +0000 (12:50 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 8 Jul 2002 12:50:49 +0000 (12:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4547 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/lyxpreview2ppm.sh

index 38c75186f3c5e5feb5b599bd84209cd0441510dd..8c60f9efdb970ced63d001cab8fbb7d9c5a68add 100644 (file)
@@ -116,8 +116,8 @@ rm -f ${SEDSCRIPT}
 EXECUTABLE="extracting metrics"; CHECK_STATUS
 
 # The ppm files have spurious (?! say some !) white space on the left and right
-# sides. If you don't want this set REMOVE_WS=0.
-REMOVE_WS=1
+# sides. If you want this set REMOVE_WS=1.
+REMOVE_WS=0
 
 which pnmcrop > /dev/null
 STATUS=$?
@@ -126,17 +126,16 @@ if [ ${STATUS} -ne 0 ]; then
        REMOVE_WS=0
 fi
 
-if [ REMOVE_WS -eq 1 ]; then
+if [ ${REMOVE_WS} -eq 1 ]; then
        TMP=.${BASE}.ppm
-       for FILE=`ls ${BASE}???.ppm`
+       for FILE in `ls ${BASE}???.ppm`
        do
-               pnmcrop -left -right ${FILE} > ${TMP}
+               pnmcrop -left ${FILE} | pnmcrop -right > ${TMP}
                STATUS=$?
                if [ ${STATUS} -eq 0 ]; then
                        mv -f ${TMP} ${FILE}
                fi
        done
-       rm -f ${TMP}
 fi
 
 # All was successful, so remove everything except the ppm files and the