mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-08 04:19:39 +00:00
get-otp: search for file in sync folder
This commit is contained in:
parent
a9a5ae6d0c
commit
6869c0ab9a
@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
accounts_file=$1
|
||||
andotp_sync_folder="$HOME/.local/share/andotp"
|
||||
|
||||
# Check if file path was provided
|
||||
if [ -z "$accounts_file" ]; then
|
||||
echo "File not provided."
|
||||
exit 1
|
||||
# Get from the andOTP backup/sync folder
|
||||
accounts_file="$(find "$andotp_sync_folder" -type f -name \*.aes | sort -r | sed -n '1p')"
|
||||
fi
|
||||
|
||||
printf "Password: "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user