Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
b5b528603d |
1 changed files with 2 additions and 6 deletions
8
bin/lock
8
bin/lock
|
@ -9,11 +9,7 @@ error() {
|
||||||
[ -n "$1" ] || error "input file missing"
|
[ -n "$1" ] || error "input file missing"
|
||||||
[ -r "$1" ] || error "can't read input file"
|
[ -r "$1" ] || error "can't read input file"
|
||||||
|
|
||||||
# shellcheck disable=SC2016 # I don't want $(tty) to be expanded
|
|
||||||
printf '#!/bin/sh
|
printf '#!/bin/sh
|
||||||
GPG_TTY=$(tty)
|
openssl enc -d -aes256 -pbkdf2 -base64 <<EOF
|
||||||
export GPG_TTY
|
|
||||||
base64 -d <<EOF | gpg -d
|
|
||||||
%s
|
%s
|
||||||
EOF
|
EOF' "$(openssl enc -aes256 -pbkdf2 -base64 -in "$1")"
|
||||||
' "$(gpg -c --cipher-algo AES256 -o - -- "$1" | base64)"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue