From 541dd04a7735bfd1602d1428626ed001d612ff9a Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 31 Aug 2010 03:04:46 -0300 Subject: [PATCH] Debugged and cleaned up schps2pdf. - scripts/schps2pdf: don't need to export i (reported by Wolfgang Spraul) - scripts/schps2pdf: removed dysfunctional (and incorrect, if it had worked) second increment of i - scripts/schps2pdf: simplified quoting of the -sOutputFile argument - scripts/schps2pdf: \$$i needs curly braces to work for more than nine files --- scripts/schps2pdf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/schps2pdf b/scripts/schps2pdf index eff40d1..7a16317 100755 --- a/scripts/schps2pdf +++ b/scripts/schps2pdf @@ -50,10 +50,10 @@ done in=${1:--} shift -eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\""$out\"" -f \ - `export i=1; for n in "$in" "$@"; do \ +eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\"$out\" -f \ + `i=1; for n in "$in" "$@"; do \ i=\`expr $i + 1\`; echo "<(sheet=\"\`basename \"$n\" .ps\`\"; - set x $titles; i=\`expr $i + 1\`; eval t='\\$$i'; + set x $titles; eval t='\\${$i}'; $toc && echo '[ /Title ('\"\\${t:-\\${sheet#$prefix}}\"') /OUT pdfmark'; cat \"$n\";)"; done`