chiark / gitweb /
bin/mdw-editor: Set TMPDIR from TMP if it's unset.
[profile] / bin / mdw-editor
index aa52fd56b57a3c73cf62633906ad059fab3b2780..c162da30bf4a037aeeda8355e25050ffdfbc5f80 100755 (executable)
@@ -2,6 +2,9 @@
 
 set -e
 editor=${MDW_EDITOR-ed}
+case ${TMP+t},${TMPDIR+t} in
+  t,) TMPDIR=$TMP; export TMPDIR ;;
+esac
 emacsclient=$(
   emacsclient --eval '(>= emacs-major-version 23)' 2>/dev/null || :)
 [ -t 0 -a -t 1 ] || TERM=dumb