]> git.sev.monster Git - dotfiles.git/commitdiff
zshenv: add _sev_proot_old_username for proot tmp
authorsev <git@sev.monster>
Fri, 23 Aug 2024 17:33:47 +0000 (12:33 -0500)
committersev <git@sev.monster>
Fri, 23 Aug 2024 17:42:22 +0000 (12:42 -0500)
etc/zsh/.zshenv

index 2cbb88a06810125fdd714d8f5242efe6aacb71dc..69ac9bc3fa8bea394a4cc83409aeeb9e04a84507 100644 (file)
@@ -156,7 +156,10 @@ if [[ ! -v _sev_setup_path || -o login ]] {
 if [[ ! -v _sev_tmp ]] {
     _sev_tmp=~/.local/tmp
     # create personal TMPDIR under system tmp
-    t=${TMPDIR:-${TEMPDIR:-${TEMP:-${TMP:-${${TMPPREFIX%/zsh}:-/tmp}}}}}/.home-$LOGNAME
+    # NOTE: under proot with uid remapping, we can reuse old tmp, without
+    #       worrying about permission issues; intended for proot under termux.
+    # XXX: _sev_proot_old_user only works if /tmp is shared!
+    t=${TMPDIR:-${TEMPDIR:-${TEMP:-${TMP:-${${TMPPREFIX%/zsh}:-/tmp}}}}}/.home-${_sev_proot_old_username:-$LOGNAME}
     [[ -e $t ]] || mkdir -m700 $t 2>/dev/null
     if [[ ! -d $t ]] {
         # fallback TMPDIR to bare local directory or existing softlink
This page took 0.035938 seconds and 4 git commands to generate.