patch-lib_ps2epsi 689 B

1234567891011121314151617181920212223242526
  1. $OpenBSD: patch-lib_ps2epsi,v 1.7 2012/08/22 06:24:17 ajacoutot Exp $
  2. --- lib/ps2epsi.orig Wed Aug 8 10:01:36 2012
  3. +++ lib/ps2epsi Fri Aug 17 15:12:56 2012
  4. @@ -10,20 +10,7 @@ fi
  5. GS_EXECUTABLE="$gs"
  6. # try to create a temporary file securely
  7. -if test -z "$TMPDIR"; then
  8. - TMPDIR=/tmp
  9. -fi
  10. -if which mktemp >/dev/null 2>/dev/null; then
  11. - tmpfile="`mktemp $TMPDIR/ps2epsi.XXXXXX`"
  12. -else
  13. - tmpdir=$TMPDIR/ps2epsi.$$
  14. - (umask 077 && mkdir "$tmpdir")
  15. - if test ! -d "$tmpdir"; then
  16. - echo "failed: could not create temporary file"
  17. - exit 1
  18. - fi
  19. - tmpfile="$tmpdir"/ps2epsi$$
  20. -fi
  21. +tmpfile=`mktemp -t ps2epsiXXXXXXXXXX` || exit 1
  22. trap "rm -rf \"$tmpfile\"" 0 1 2 3 7 13 15
  23. export outfile