* usr/lib/byobu/.dirs: LP: #833780

- save a fork
This commit is contained in:
Dustin Kirkland 2011-08-26 19:03:22 -05:00
commit 4bd05ca384
2 changed files with 5 additions and 2 deletions

2
debian/changelog vendored
View file

@ -7,6 +7,8 @@ byobu (4.32) unreleased; urgency=low
- fix a suite of support issues around launching byobu under sudo,
where files/dirs would be created under the $SUDO_USER's $HOME,
but would be owned by root
* usr/lib/byobu/.dirs: LP: #833780
- save a fork
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 23 Aug 2011 23:23:49 -0500

View file

@ -44,9 +44,10 @@ if [ -d "$XDG_CACHE_HOME" ]; then
elif [ -d "$SOCKETDIR/S-$USER" ]; then
# But for FAR better performance, use a tmpfs if available
export BYOBU_RUN_DIR="$SOCKETDIR/S-$USER/$PKG"
elif [ -n "$TMUX" ] && [ -d "$(dirname $TMUX)" ]; then
elif [ -n "$TMUX" ] && [ d=$(dirname "$TMUX") ] && [ -d "$d" ]; then
# Or perhaps try the tmux tmpdir
export BYOBU_RUN_DIR="$(dirname $TMUX)/$PKG"
export BYOBU_RUN_DIR="$d"
d=
else
# But if not, we'll use a cache directory
export BYOBU_RUN_DIR="$HOME/.cache/$PKG"