sekrit: don't define a default SEKRIT_GPG_ID
And abort operation if no SEKRIT_GPG_ID is provided.
This commit is contained in:
parent
1839a100f6
commit
a7c8d5e369
@ -10,7 +10,7 @@
|
|||||||
.\" Dedication along with this software. If not, see
|
.\" Dedication along with this software. If not, see
|
||||||
.\" <http://creativecommons.org/publicdomain/zero/1.0/>.
|
.\" <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
.\"
|
.\"
|
||||||
.Dd May 25, 2020
|
.Dd August 26, 2020
|
||||||
.Dt SEKRIT 1
|
.Dt SEKRIT 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -117,8 +117,9 @@ Defaults to
|
|||||||
.Pa ~/keep/sekrit .
|
.Pa ~/keep/sekrit .
|
||||||
.It Ev SEKRIT_GPG_ID
|
.It Ev SEKRIT_GPG_ID
|
||||||
The recipient to whom encrypt the files.
|
The recipient to whom encrypt the files.
|
||||||
Defaults to
|
Must be set for
|
||||||
.Ar myself .
|
.Nm
|
||||||
|
to work.
|
||||||
.El
|
.El
|
||||||
.Sh EXIT STATUS
|
.Sh EXIT STATUS
|
||||||
.Ex -std
|
.Ex -std
|
||||||
|
@ -193,9 +193,10 @@ shift
|
|||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
: ${SEKRIT_DIR:=~/keep/sekrit}
|
: ${SEKRIT_DIR:=~/keep/sekrit}
|
||||||
: ${SEKRIT_GPG_ID:=myself}
|
|
||||||
mkdir -p "$SEKRIT_DIR"
|
mkdir -p "$SEKRIT_DIR"
|
||||||
|
|
||||||
|
[ -n "$SEKRIT_GPG_ID" ] || err "SEKRIT_GPG_ID is empty"
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
add) sekrit_add "$@" ;;
|
add) sekrit_add "$@" ;;
|
||||||
cp) sekrit_cp "$@" ;;
|
cp) sekrit_cp "$@" ;;
|
||||||
|
@ -19,6 +19,9 @@ export EDITOR PAGER VISUAL
|
|||||||
GPG_TTY=$(tty)
|
GPG_TTY=$(tty)
|
||||||
export GPG_TTY
|
export GPG_TTY
|
||||||
|
|
||||||
|
SEKRIT_GPG_ID=sekrit_key
|
||||||
|
export SEKRIT_GPG_ID
|
||||||
|
|
||||||
alias cp="cp -i"
|
alias cp="cp -i"
|
||||||
alias l="ls -F"
|
alias l="ls -F"
|
||||||
alias la="ls -aF"
|
alias la="ls -aF"
|
||||||
|
Loading…
Reference in New Issue
Block a user