From ec5eeec7445fe3d662ddd8e1df573931b9bb312c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 24 Sep 2012 00:49:17 +0200 Subject: Style fixes. --- INSTALL | 1 - Makefile | 4 ++-- man/pass.1 | 10 ++++++---- src/password-store.sh | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index 1ab756c..148400c 100644 --- a/INSTALL +++ b/INSTALL @@ -12,4 +12,3 @@ BINDIR default: $(PREFIX)/bin LIBDIR default: $(PREFIX)/lib MANDIR default: $(PREFIX)/share/man SYSCONFDIR default: /etc - diff --git a/Makefile b/Makefile index 2d2a9c4..8735c7b 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,10 @@ ifneq ($(strip $(wildcard $(PLATFORMFILE))),) install-platform: @install -m 0644 -v "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store.platform.sh" # The -i "" doesn't work on GNU, where the extra argument isn't needed. Fortuantely, platform file is for non-GNU only. - sed -i "" 's:.*platform-defined-functions.*:source $(DESTDIR)$(LIBDIR)/password-store.platform.sh:' $(DESTDIR)$(BINDIR)/pass + sed -i "" 's:.*platform-defined-functions.*:source $(DESTDIR)$(LIBDIR)/password-store.platform.sh:' "$(DESTDIR)$(BINDIR)/pass" else install-platform: endif uninstall: - @rm -vf $(DESTDIR)$(BINDIR)/pass $(DESTDIR)$(MANDIR)/man1/pass.1 $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/password-store $(DESTDIR)$(LIBDIR)/password-store.platform.sh + @rm -vf "$(DESTDIR)$(BINDIR)/pass" "$(DESTDIR)$(MANDIR)/man1/pass.1" "$(DESTDIR)$(SYSCONFDIR)/bash_completion.d/password-store" "$(DESTDIR)$(LIBDIR)/password-store.platform.sh" diff --git a/man/pass.1 b/man/pass.1 index e405174..3ccfa67 100644 --- a/man/pass.1 +++ b/man/pass.1 @@ -1,4 +1,4 @@ -.TH PASS 1 "2012 Sept 2" ZX2C4 "Password Store" +.TH PASS 1 "2012 Sept 24" ZX2C4 "Password Store" .SH NAME pass - stores, retrieves, generates, and synchronizes passwords securely @@ -36,8 +36,8 @@ the valid commands listed below. Several of the commands below rely on or provide additional functionality if the password store directory is also a git repository. If the password store directory is a git repository, all password store modification commands will -cause a corresponding git commit. See the \fIEXAMPLES\fP section for an -extended description using \fBinit\fP and +cause a corresponding git commit. See the \fIEXTENDED GIT EXAMPLE\fP section +for a detailed description using \fBinit\fP and .BR git (1). The \fBinit\fP command must be run before other commands in order to initialize @@ -112,7 +112,9 @@ or \fI-f\fP is specified, do not interactively prompt before removal. \fBgit\fP \fIgit-command-args\fP... If the password store is a git repository, pass \fIgit-command-args\fP as arguments to .BR git (1) -using the password store as the git repository. +using the password store as the git repository. If \fIgit-command-args\fP is \fBinit\fP, +in addition to initializing the git repository, add the current contents of the password +store to the repository in an initial commit. .TP \fBhelp\fP Show usage message. diff --git a/src/password-store.sh b/src/password-store.sh index c8736e1..503bac4 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -209,7 +209,7 @@ case "$command" in path="$1" if [[ -d $PREFIX/$path ]]; then - if [[ $path == "" ]]; then + if [[ -z $path ]]; then echo "Password Store" else echo $path @@ -350,6 +350,7 @@ case "$command" in delete|rm|remove) recursive="" force=0 + opts="$($GETOPT -o rf -l recursive,force -n "$program" -- "$@")" err=$? eval set -- "$opts" -- cgit v1.2.3