~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/share/extensions/dia2svg.sh

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
rc=0
 
4
 
 
5
# dia version 0.93 (the only version I've tested) allows `--export=-', but then
 
6
# ruins it by writing other cruft to stdout.  So we'll have to use a temp file.
 
7
# dia 0.95 removes --export-to-format but still allows -t.
 
8
TMPDIR="${TMPDIR-/tmp}"
 
9
TEMPFILENAME=`mktemp 2>/dev/null || echo "$TMPDIR/tmpdia$$.svg"`
 
10
dia -n --export="${TEMPFILENAME}" -t svg "$1" > /dev/null 2>&1 || rc=1
 
11
 
 
12
cat < "${TEMPFILENAME}" || rc=1
 
13
rm -f "${TEMPFILENAME}"
 
14
exit $rc