diff --git a/bin/sekrit.1 b/bin/sekrit.1 index 8218700..7ec895f 100644 --- a/bin/sekrit.1 +++ b/bin/sekrit.1 @@ -10,7 +10,7 @@ .\" Dedication along with this software. If not, see .\" . .\" -.Dd May 25, 2020 +.Dd August 26, 2020 .Dt SEKRIT 1 .Os .Sh NAME @@ -117,8 +117,9 @@ Defaults to .Pa ~/keep/sekrit . .It Ev SEKRIT_GPG_ID The recipient to whom encrypt the files. -Defaults to -.Ar myself . +Must be set for +.Nm +to work. .El .Sh EXIT STATUS .Ex -std diff --git a/bin/sekrit.sh b/bin/sekrit.sh index 680cff2..30c6996 100644 --- a/bin/sekrit.sh +++ b/bin/sekrit.sh @@ -193,9 +193,10 @@ shift umask 077 : ${SEKRIT_DIR:=~/keep/sekrit} -: ${SEKRIT_GPG_ID:=myself} mkdir -p "$SEKRIT_DIR" +[ -n "$SEKRIT_GPG_ID" ] || err "SEKRIT_GPG_ID is empty" + case "$cmd" in add) sekrit_add "$@" ;; cp) sekrit_cp "$@" ;; diff --git a/dotfiles/shrc b/dotfiles/shrc index ff716b9..9e7bd8c 100644 --- a/dotfiles/shrc +++ b/dotfiles/shrc @@ -19,6 +19,9 @@ export EDITOR PAGER VISUAL GPG_TTY=$(tty) export GPG_TTY +SEKRIT_GPG_ID=sekrit_key +export SEKRIT_GPG_ID + alias cp="cp -i" alias l="ls -F" alias la="ls -aF"