mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
bdd7c269ed
Former-commit-id: 3deff7d6b345fd6c1e9bac71b446730631e891c9 [formerly 2525a27cb90b003f72c7d936e2f0224848e3e49f] [formerly c699da2816b0c61bfdaf0a8b40612b9d50734d73 [formerly 5ab5c7c243
]]
Former-commit-id: 7ed9366f3c83f50afef6b40d0006c32256d053f7 [formerly 0fc1beb902fbadc6f6388b10b7ed319e15fcb7d4]
Former-commit-id: 7bd6bacacb114d72808ded8c102f8f14de450625
28 lines
677 B
Bash
Executable File
28 lines
677 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# init key for pass
|
|
gpg --batch --gen-key <<-EOF
|
|
%echo Generating a standard key
|
|
Key-Type: DSA
|
|
Key-Length: 1024
|
|
Subkey-Type: ELG-E
|
|
Subkey-Length: 1024
|
|
Name-Real: Meshuggah Rocks
|
|
Name-Email: meshuggah@example.com
|
|
Expire-Date: 0
|
|
# Do a commit here, so that we can later print "done" :-)
|
|
%commit
|
|
%echo done
|
|
EOF
|
|
|
|
key=$(gpg --no-auto-check-trustdb --list-secret-keys | grep ^sec | cut -d/ -f2 | cut -d" " -f1)
|
|
pass init $key
|
|
|
|
if [ "$(command -v docker-credential-pass)" = "" ]; then
|
|
docker run --rm -itv /usr/local/bin:/src filebrowser/dev sh -c "cp /go/bin/docker-credential-pass /src"
|
|
fi
|
|
|
|
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
|