summaryrefslogtreecommitdiff
path: root/password-store.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpassword-store.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/password-store.sh b/password-store.sh
index 8d7f853..3ec5b37 100755
--- a/password-store.sh
+++ b/password-store.sh
@@ -34,13 +34,16 @@ Usage:
If the password store is a git repository, push the latest changes.
$program pull
If the password store is a git repository, pull the latest changes.
+ $program git git-command-args...
+ If the password store is a git repository, execute a git command
+ specified by git-command-args.
$program help
Show this text.
_EOF
}
isCommand() {
case "$1" in
- init|ls|show|insert|generate|remove|rm|delete|push|pull|help) return 0 ;;
+ init|ls|show|insert|generate|remove|rm|delete|push|pull|git|help) return 0 ;;
*) return 1 ;;
esac
}
@@ -223,6 +226,14 @@ case "$command" in
exit 1
fi
;;
+ git)
+ if [[ -d $GIT ]]; then
+ exec git $@
+ else
+ echo "Error: the password store is not a git repository."
+ exit 1
+ fi
+ ;;
*)
usage
exit 1
baf1171b4e343929dd43ecac7cd9d1c692b84ec&follow=1'>Don't truncate valid cachefilesLars Hjemli3-4/+16 2006-12-11Move global variables + callback functions into shared.cLars Hjemli4-82/+86 2006-12-11Move functions for generic object output into ui-view.cLars Hjemli4-34/+43 2006-12-11Move log-functions into ui-log.cLars Hjemli5-111/+121 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli4-47/+59 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli5-70/+90 2006-12-11Move common output-functions into ui-shared.cLars Hjemli4-82/+99 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli4-28/+29 2006-12-11Avoid infinite loops in caching layerLars Hjemli3-14/+31 2006-12-11Let 'make install' clear all cachefilesLars Hjemli1-0/+2 2006-12-11Fix cache algorithm loopholeLars Hjemli3-11/+16 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 2006-12-10Add caching infrastructureLars Hjemli9-28/+353