projects/aports·blob master · refs

13 lines · 314 B

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