mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 04:49:38 +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
|
#!/bin/sh
|
||||||
|
|
||||||
accounts_file=$1
|
accounts_file=$1
|
||||||
|
andotp_sync_folder="$HOME/.local/share/andotp"
|
||||||
|
|
||||||
# Check if file path was provided
|
# Check if file path was provided
|
||||||
if [ -z "$accounts_file" ]; then
|
if [ -z "$accounts_file" ]; then
|
||||||
echo "File not provided."
|
# Get from the andOTP backup/sync folder
|
||||||
exit 1
|
accounts_file="$(find "$andotp_sync_folder" -type f -name \*.aes | sort -r | sed -n '1p')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Password: "
|
printf "Password: "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user