diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 15:10:22 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 15:39:51 -0400 |
commit | 3295c5fd9b09fe0af48e11222c41d69f5bae5dbe (patch) | |
tree | 9d86324e241e893433054399dbb29a88705ce9b1 /.config/login.d/90_symlink_xdg_runtime_dir.sh | |
parent | 9f5efa128ef0c1177856682659969e2bc8accfd2 (diff) |
login.sh: Do a better job of handling if variables aren't set
Diffstat (limited to '.config/login.d/90_symlink_xdg_runtime_dir.sh')
-rw-r--r-- | .config/login.d/90_symlink_xdg_runtime_dir.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.config/login.d/90_symlink_xdg_runtime_dir.sh b/.config/login.d/90_symlink_xdg_runtime_dir.sh index b89f7b1..bc6109d 100644 --- a/.config/login.d/90_symlink_xdg_runtime_dir.sh +++ b/.config/login.d/90_symlink_xdg_runtime_dir.sh @@ -1,4 +1,6 @@ # This is really only needed for ssh ControlPath; as I don't have a # way to communicate XDG_RUNTIME_DIR -mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" -ln -sfT -- "$XDG_RUNTIME_DIR" "$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" +if [ -n "$XDG_RUNTIME_DIR" ]; then + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" + ln -sfT -- "$XDG_RUNTIME_DIR" "$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" +fi |