Files
git.taskfile.build/bin/save-pass-to-keepass
T

36 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
save-pass-to-keepass() {
if [[ -z "$1" ]]; then
echo "\$1 (password) is empty."
exit 1
fi
if [[ -z "$2" ]]; then
echo "\$2 (entry path) is empty."
exit 1
fi
local password="$1"
local keepass_entry="$2"
if [[ ! -f "$KEEPASS_DATABASE_FILE" ]]; then
echo "Keepass database file not found: $KEEPASS_DATABASE_FILE"
exit 1
fi