From 0c206975815229b8d716ec4dd00a755f4b55032f Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Tue, 9 Oct 2018 13:17:15 +0900 Subject: [PATCH] Use md5 hex for tmp directory --- profile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profile b/profile index c252e2a..fb9fb59 100755 --- a/profile +++ b/profile @@ -97,7 +97,8 @@ then fi fi -expr "$TMP" : ".*$USER-tmp" >/dev/null || export TMP="${TMP}/${USER}-tmp" +__user_uuid=$(perl -e "use Digest::MD5 qw(md5_hex); print md5_hex('$USER$HOSTNAME')") +expr "$TMP" : ".*${__user_uuid}-tmp" >/dev/null || export TMP="${TMP}/${__user_uuid}-tmp" export TEMP=$TMP export TMPDIR=$TMP test -d "$TMP" || mkdir -p "$TMP"