Skip to content

Commit

Permalink
Merge pull request #10 from drduh/wip-fix-pwdsh-var
Browse files Browse the repository at this point in the history
Fix var names from pwd.sh
  • Loading branch information
drduh authored Jul 4, 2024
2 parents bb75af0 + 73efa6d commit bb3a2fa
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions purse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ today="$(date +%F)"
gpg="$(command -v gpg || command -v gpg2)"
gpg_conf="${HOME}/.gnupg/gpg.conf"

clip="${PWDSH_CLIP:=xclip}" # clipboard, 'pbcopy' on macOS
clip_args=${PWDSH_CLIP_ARGS:=} # args to pass to copy command
clip="${PURSE_CLIP:=xclip}" # clipboard, 'pbcopy' on macOS
clip_args=${PURSE_CLIP_ARGS:=} # args to pass to copy command
clip_dest="${PURSE_DEST:=clipboard}" # set to 'screen' to print to stdout
clip_timeout="${PURSE_TIME:=10}" # seconds to clear clipboard/screen
comment="${PURSE_COMMENT:=}" # *unencrypted* comment in files
Expand Down Expand Up @@ -210,7 +210,7 @@ list_entry () {
backup () {
# Archive index, safe and configuration.

if [[ ! -f ${safe_backup} ]] ; then
if [[ ! -f "${safe_backup}" ]] ; then
if [[ -f "${safe_ix}" && -d "${safe_dir}" ]] ; then
cp "${gpg_conf}" "gpg.conf.${today}"
tar cf "${safe_backup}" "${safe_dir}" "${safe_ix}" \
Expand Down Expand Up @@ -246,18 +246,15 @@ new_entry () {
Username (Enter to generate): " username
else username="${2}" ; fi
if [[ -z "${username}" ]] ; then
username=$(generate_user "$@")
fi
username=$(generate_user "$@") ; fi

if [[ -z "${3+x}" ]] ; then
get_pass "Password for \"${username}\" (Enter to generate): "
userpass="${password}"
fi
userpass="${password}" ; fi

printf "\n"
if [[ -z "${password}" ]] ; then
userpass=$(generate_pass "$@")
fi
userpass=$(generate_pass "$@") ; fi
}

print_help () {
Expand Down

0 comments on commit bb3a2fa

Please sign in to comment.