|
|
|
@ -73,7 +73,7 @@ gocrypt_close() {
|
|
|
|
|
gocrypt_delegate() {
|
|
|
|
|
gocrypt_open_check
|
|
|
|
|
# Delegate command to another `pass` instance that manages what is inside of the mountpoint
|
|
|
|
|
PASSWORD_STORE_DIR="$PWD/$gocrypt_dec_dir" pass $@
|
|
|
|
|
PASSWORD_STORE_DIR="$PWD/$gocrypt_dec_dir" pass "$@"
|
|
|
|
|
# Commit if there has been changes due to this operation
|
|
|
|
|
pass git add "$gocrypt_dir"
|
|
|
|
|
pass git commit -m "Encrypted pass operation inside gocrypt" "$gocrypt_dir" || echo "No git commit created"
|
|
|
|
@ -152,23 +152,23 @@ case "$1" in
|
|
|
|
|
;;
|
|
|
|
|
init)
|
|
|
|
|
shift
|
|
|
|
|
gocrypt_init $@
|
|
|
|
|
gocrypt_init "$@"
|
|
|
|
|
;;
|
|
|
|
|
open)
|
|
|
|
|
shift
|
|
|
|
|
gocrypt_open $@
|
|
|
|
|
gocrypt_open "$@"
|
|
|
|
|
;;
|
|
|
|
|
crypt)
|
|
|
|
|
shift
|
|
|
|
|
gocrypt_crypt $@
|
|
|
|
|
gocrypt_crypt "$@"
|
|
|
|
|
;;
|
|
|
|
|
close)
|
|
|
|
|
shift
|
|
|
|
|
gocrypt_close $@
|
|
|
|
|
gocrypt_close "$@"
|
|
|
|
|
;;
|
|
|
|
|
ls|list|grep|find|search|show|insert|add|edit|generate|rm|remove|delete|mv|rename|cp|copy|git)
|
|
|
|
|
# No shift here since we need to delegate these commands to another pass instance
|
|
|
|
|
gocrypt_delegate $@
|
|
|
|
|
gocrypt_delegate "$@"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
gocrypt_die "Unknown command $1 for gocrypt"
|
|
|
|
|