summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index e8948a1..ce140db 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -28,14 +28,14 @@ export GIT_WORK_TREE="${PASSWORD_STORE_GIT:-$PREFIX}"
#
git_add_file() {
- [[ -d $GIT_DIR ]] || return
+ [[ -e $GIT_DIR ]] || return
git add "$1" || return
[[ -n $(git status --porcelain "$1") ]] || return
git_commit "$2"
}
git_commit() {
local sign=""
- [[ -d $GIT_DIR ]] || return
+ [[ -e $GIT_DIR ]] || return
[[ $(git config --bool --get pass.signcommits) == "true" ]] && sign="-S"
git commit $sign -m "$1"
}
@@ -310,7 +310,7 @@ cmd_init() {
if [[ $# -eq 1 && -z $1 ]]; then
[[ ! -f "$gpg_id" ]] && die "Error: $gpg_id does not exist and so cannot be removed."
rm -v -f "$gpg_id" || exit 1
- if [[ -d $GIT_DIR ]]; then
+ if [[ -e $GIT_DIR ]]; then
git rm -qr "$gpg_id"
git_commit "Deinitialize ${gpg_id}${id_path:+ ($id_path)}."
fi
@@ -551,7 +551,7 @@ cmd_delete() {
[[ $force -eq 1 ]] || yesno "Are you sure you would like to delete $path?"
rm $recursive -f -v "$passfile"
- if [[ -d $GIT_DIR && ! -e $passfile ]]; then
+ if [[ -e $GIT_DIR && ! -e $passfile ]]; then
git rm -qr "$passfile"
git_commit "Remove $path from store."
fi
@@ -592,7 +592,7 @@ cmd_copy_move() {
mv $interactive -v "$old_path" "$new_path" || exit 1
[[ -e "$new_path" ]] && reencrypt_path "$new_path"
- if [[ -d $GIT_DIR && ! -e $old_path ]]; then
+ if [[ -e $GIT_DIR && ! -e $old_path ]]; then
git rm -qr "$old_path"
git_add_file "$new_path" "Rename ${1} to ${2}."
fi
@@ -613,7 +613,7 @@ cmd_git() {
git_add_file .gitattributes "Configure git repository for gpg file diff."
git config --local diff.gpg.binary true
git config --local diff.gpg.textconv "$GPG -d ${GPG_OPTS[*]}"
- elif [[ -d $GIT_DIR ]]; then
+ elif [[ -e $GIT_DIR ]]; then
tmpdir nowarn #Defines $SECURE_TMPDIR. We don't warn, because at most, this only copies encrypted files.
export TMPDIR="$SECURE_TMPDIR"
git "$@"
013-10-16Print username or description in titleRené 'Necoro' Neumann3-2/+5 2013-10-15QuotestyleRené 'Necoro' Neumann11-86/+88 2013-10-15Flash on error in all formsRené 'Necoro' Neumann2-5/+21 2013-10-15Streamline CSSRené 'Necoro' Neumann2-77/+24 2013-10-15Margin for buttons in formsRené 'Necoro' Neumann1-0/+3 2013-10-15Support flashingRené 'Necoro' Neumann5-2/+34 2013-10-15Moved user implementation from model to loginRené 'Necoro' Neumann3-28/+13 2013-10-15Nicer organised importsRené 'Necoro' Neumann6-24/+40 2013-10-14Finish login stuffRené 'Necoro' Neumann11-29/+143 2013-10-14More model tuningRené 'Necoro' Neumann1-3/+3 2013-10-14Add User to modelRené 'Necoro' Neumann1-8/+25 2013-09-30Add first API stuff -- SingleExpense and CategoryRené 'Necoro' Neumann2-1/+13 2013-09-30Force python2René 'Necoro' Neumann1-1/+1 2013-09-24More margin at the bottom for expense listingRené 'Necoro' Neumann1-1/+1 2013-09-24Better pie formattingRené 'Necoro' Neumann3-6/+8 2013-09-24Increase width of page to 760pxRené 'Necoro' Neumann3-8/+9 2013-09-16typoRené 'Necoro' Neumann1-1/+1 2013-09-15Fix display of one monthRené 'Necoro' Neumann1-2/+2 2013-09-14Draw pies using highcharts JS-libRené 'Necoro' Neumann5-20/+99