1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-14 03:39:53 +03:00
aports/community/gcr4/gcr-ssh-agent-wrapper

13 lines
314 B
Bash
Executable file

#!/bin/sh
UID="$(id -u)"
if [ ! "$UID" ]; then exit 1; fi
# Create base directory for the ssh-agent socket.
GCR_BASE_DIR="${XDG_RUNTIME_DIR-"/run/user/$UID"}/gcr"
if [ -e "$GCR_BASE_DIR" ]; then
rm -rf "$GCR_BASE_DIR"
fi
mkdir -p "$GCR_BASE_DIR"
exec /usr/libexec/gcr-ssh-agent --base-dir "$GCR_BASE_DIR" "$@"