diff --git a/gocrypt.bash b/gocrypt.bash index 03a69b4..d6a9f9a 100755 --- a/gocrypt.bash +++ b/gocrypt.bash @@ -36,11 +36,11 @@ gocrypt_init() { gocrypt_die "gocrypt plugin already initialized for your password store" fi - pass generate "$gocrypt_passwd_file" 32 + cmd_generate "$gocrypt_passwd_file" 32 # Initialize gocryptfs mkdir "$gocrypt_dir" - gocryptfs -passfile /dev/stdin -init "$gocrypt_dir" <<< "$(pass show "$gocrypt_passwd_file")" + gocryptfs -passfile /dev/stdin -init "$gocrypt_dir" <<< "$(cmd_show "$gocrypt_passwd_file")" # Mount the gocryptfs subdirectory and initialze what is inside of it gocrypt_open @@ -53,16 +53,16 @@ gocrypt_init() { echo "# Gocrypt" >> .gitignore echo "gocrypt" >> .gitignore - pass git add .gitignore - pass git add "$gocrypt_dir" - pass git commit -m "Initialized encrypted storage for gocrypt plugin" + cmd_git add .gitignore + cmd_git add "$gocrypt_dir" + cmd_git commit -m "Initialized encrypted storage for gocrypt plugin" } gocrypt_open() { gocrypt_close_check mkdir -p "$gocrypt_dec_dir" - gocryptfs -passfile /dev/stdin "$gocrypt_dir" "$gocrypt_dec_dir" <<< "$(pass show "$gocrypt_passwd_file")" + gocryptfs -passfile /dev/stdin "$gocrypt_dir" "$gocrypt_dec_dir" <<< "$(cmd_show "$gocrypt_passwd_file")" } gocrypt_close() { @@ -75,8 +75,8 @@ gocrypt_delegate() { # Delegate command to another `pass` instance that manages what is inside of the mountpoint 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" + cmd_git add "$gocrypt_dir" + cmd_git commit -m "Encrypted pass operation inside gocrypt" "$gocrypt_dir" || echo "No git commit created" } gocrypt_crypt() {