1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

Merged the functionality of gitsch2ppm into schhist2web.

- scripts/normalizeschps: don't edit in place and thus become capable of
  running in a pipe
- scripts/schps2ppm: considered - to be an option and thus didn't accept
  it as input file name
- scripts/schhist2web: open-coded functionality of "gitsch2ppm"
- scripts/gitsch2ppm: removed
This commit is contained in:
Werner Almesberger
2010-08-30 02:53:41 -03:00
parent b3f2014863
commit 800577353e
4 changed files with 35 additions and 109 deletions

View File

@@ -190,18 +190,25 @@ for n in $first `cd "$dir" && git rev-list --reverse $first..HEAD`; do
echo Name change $schname to $new 1>&2
schname="$new"
fi
trap "rm -rf \"$cache/ppm_$n\" \"$cache/fat_$n\"" 0
tmp=`pwd`/_schhist2web
trap "rm -rf \"$cache/ppm_$n\" \"$cache/fat_$n\" \"$tmp\"" 0
if [ ! -d "$cache/ppm_$n" ]; then
rm -rf "$cache/ppm_$n"
mkdir "$cache/ppm_$n"
rm -rf "$cache/ppm_$n" "$cache/fat_$n"
mkdir "$cache/ppm_$n" "$cache/fat_$n"
#
# potential optimization here: remember Postscript files from previous
# run (or their md5sum) and check if they have changed. If not, skip
# the ghostscript run and just put a symlink, replacing the less
# efficient optimization below.
#
gitsch2ppm $sanitize -k "$dir" "$schname" $n "$cache/ppm_$n" || exit
gitsch2ppm -c -w 500 "$dir" "$schname" $n "$cache/fat_$n" || exit
gitsch2ps $sanitize "$dir" "$schname" $n "$tmp" || exit
for m in "$tmp"/*.ps; do
ppm="$cache/ppm_$n/`basename "$m" .ps`.ppm"
normalizeschps "$m" | schps2ppm - "$ppm" || exit
ppm="$cache/fat_$n/`basename "$m" .ps`.ppm"
normalizeschps -w 500 "$m" | schps2ppm - "$ppm" || exit
done
rm -rf "$tmp"
fi
for m in "$cache/ppm_$n/"*; do
[ "$m" = "$cache/ppm_$n/*" ] && break