git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to change to directory from which become was run.
[profile.git]
/
.profile.d
/
screen.bashrc
diff --git
a/.profile.d/screen.bashrc
b/.profile.d/screen.bashrc
index
440395e
..
c2b1014
100644
(file)
--- a/
.profile.d/screen.bashrc
+++ b/
.profile.d/screen.bashrc
@@
-1,12
+1,13
@@
# Fixup screen and define ``session'' if available.
screen=$(find_working screen 2>/dev/null)
if [ $? = 0 ]; then
# Fixup screen and define ``session'' if available.
screen=$(find_working screen 2>/dev/null)
if [ $? = 0 ]; then
- # Override SCREENDIR iff screen is not set
u
id (but not under sudo).
- if
! ls -l "$screen" | cut -d ' ' -f 1 | grep s >/dev/null
; then
+ # Override SCREENDIR iff screen is not set
g
id (but not under sudo).
+ if
[ ! -g "$screen" ]
; then
if [ -n "$SUDO_USER" ]; then
unset SCREENDIR
else
if [ -n "$SUDO_USER" ]; then
unset SCREENDIR
else
- export SCREENDIR="${PROFILE_HOME:-~}/.screen/$HOSTNAME"
+ export SCREENDIR="$HOME/.screen/$HOSTNAME"
+ mkdir -p "$SCREENDIR"
fi
fi
fi
fi