From 6ef2e22f0978388d05609c69ef703503800ab64c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 24 Jan 2015 21:53:51 +0900 Subject: [PATCH] Use $HOME/.var/run for some runtime files #3 --- shrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shrc b/shrc index cfad1d5..2a6aeda 100755 --- a/shrc +++ b/shrc @@ -31,6 +31,9 @@ __cr=$'\r' test -n "$TMP" || export TMP=/tmp/${USER}-tmp mkdir -p "$TMP" +__homerun="$HOME/.var/run" +mkdir -p "$__homerun" + ########################## # system type @@ -62,7 +65,7 @@ fi ######################### # system detection -__system_shrc="$TMP/system.shrc" +__system_shrc="$__homerun/system.shrc" if test -f "$__system_shrc" then @@ -1039,7 +1042,7 @@ __my_ps1_ipaddr(){ } __my_ps1_bttry(){ - ___bst="${TMP}/batterystatus" + ___bst="$__homerun/batterystatus" if test -z "$DISPLAY" && ! $iswindows then test -f $___bst && ___bstr="$(cat $___bst)"