get-otp/encrypt-otp.in

17 lines
300 B
Plaintext
Raw Normal View History

2020-10-08 22:25:20 -05:00
#!/bin/sh
dest="${OTP_ACCOUNTS:-$HOME/.local/share/otp_accounts}"
file="$1"
if [ ! -e "$file" ]; then
echo "'$file' doesn't exist!"
exit 1
fi
if @PREFIX@/libexec/cbc-file lock "$file" > "$dest"; then
echo "'$dest' successfully generated!"
exit 0
else
echo "couldn't create '$dest'"
exit 1
fi