047bc59dc8
Removed all the files that were duplicated on lfs_dockers repo Re-routed the transport of pgp keys using the newer more correct gpg_agent docker image Added some logic to work with mingw32 too
19 lines
684 B
Bash
Executable File
19 lines
684 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#Based off of https://github.com/andyneff/gpg_agent/blob/master/start.bsh
|
|
|
|
set -eu
|
|
|
|
CUR_DIR=$(dirname ${BASH_SOURCE[0]})
|
|
IMAGE_NAME=andyneff/gpg_agent
|
|
CONTAINER_NAME=git-lfs-gpg
|
|
|
|
: ${SUDO=`if ( [ ! -w /var/run/docker.sock ] && id -nG | grep -qwv docker && [ "${DOCKER_HOST:+dh}" != "dh" ] ) && which sudo > /dev/null 2>&1; then echo sudo; fi`}
|
|
|
|
if [ "$(docker inspect -f {{.State.Running}} ${CONTAINER_NAME})" != "true" ]; then
|
|
OTHER_OPTIONS=("-e" "GPG_DEFAULT_CACHE=${GPG_DEFAULT_CACHE:-31536000}")
|
|
OTHER_OPTIONS+=("-e" "GPG_MAX_CACHE=${GPG_MAX_CACHE:-31536000}")
|
|
|
|
${SUDO} docker run -d -t "${OTHER_OPTIONS[@]}" --name ${CONTAINER_NAME} ${IMAGE_NAME}
|
|
fi
|