spm

Personal fork of spm (simple password manager)
git clone git@getsh.org:spm.git
Log | Files | Refs | README | LICENSE

commit 9d0021f8c50c5a9f59c8c46c7edc9c794348edb5
parent ffef68581cfacb2090ec97c7948d1726496a07d4
Author: Klemens Nanni <kl3@posteo.org>
Date:   Mon, 10 Apr 2017 23:41:30 +0200

Use more appropiate umask, change order of checks

Diffstat:
Mspm | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spm b/spm @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. set -eu -umask 077 +umask u=rwX,og= ## Variables GPG_OPTS='--quiet --yes --batch' @@ -34,10 +34,10 @@ usage() { } check() { + [ -n "${entry}" ] || usage 'no such entry' + [ $(printf '%s' "${entry}" | wc -l) -eq 0 ] || usage 'ambigious expression' - - [ -n "${entry}" ] || usage 'no such entry' } gpg() {