chiark / gitweb /
dot/bashrc, dot/shell-rc: Set TMPDIR as common per-shell behaviour.
[profile] / dot / shell-rc
index 1fa43438241bb5c8cc88dbb73ef205b05011ea41..11b9fc7f8e04296eeae7ba8acf116c0db337eb3f 100644 (file)
@@ -14,6 +14,10 @@ __mdw_source_if_exists () {
   done
 }
 
+## Set the temporary directory again.  (A setuid or setgid program may have
+## unhelpfully forgotten this for us.)
+case ${TMPDIR+t} in t) ;; *) eval $(tmpdir -b); esac
+
 ###--------------------------------------------------------------------------
 ### Prompt machinery.