Update Makefile compatibility and add default for TMPDIR in SSH agent start.
This commit is contained in:
parent
a7ea377432
commit
f257b5b2d3
2 changed files with 6 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -8,7 +8,7 @@ FONTS_TO_INSTALL ?= FiraCode FiraMono Hack
|
||||||
LOCAL_TOOLS_BIN ?= $(HOME)/.local/bin
|
LOCAL_TOOLS_BIN ?= $(HOME)/.local/bin
|
||||||
STOW_TARGET ?= $(HOME)
|
STOW_TARGET ?= $(HOME)
|
||||||
|
|
||||||
STOW := $(shell command -v stow 2>/dev/null)
|
STOW := $(shell command -v /usr/bin/stow 2>/dev/null)
|
||||||
|
|
||||||
# Compile stow if it doesn't exist
|
# Compile stow if it doesn't exist
|
||||||
ifeq ($(STOW),)
|
ifeq ($(STOW),)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
TMPDIR="${TMPDIR:-${XDG_RUNTIME_DIR}}"
|
||||||
|
|
||||||
if [[ -z "${SSH_CONNECTION}" ]]; then
|
if [[ -z "${SSH_CONNECTION}" ]]; then
|
||||||
if ! pgrep -u "$USER" ssh-agent >/dev/null; then
|
if ! pgrep -u "${USER}" ssh-agent >/dev/null; then
|
||||||
ssh-agent > "$TMPDIR/ssh-agent.env"
|
ssh-agent > "${TMPDIR}/ssh-agent.env"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "${SSH_AUTH_SOCK}" ]]; then
|
if [[ ! -f "${SSH_AUTH_SOCK}" ]]; then
|
||||||
source "$TMPDIR/ssh-agent.env" >/dev/null
|
source "${TMPDIR}/ssh-agent.env" >/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue