feat: Add gpg-learn-serialno command

This commit is contained in:
Louis Gallet 2023-12-16 16:55:39 +01:00
commit 18356b4c9d
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

15
Yubikey/gpg-learn-serialno.sh Executable file
View File

@ -0,0 +1,15 @@
# Print the command to be executed
echo "Executing command: gpg-connect-agent 'scd serialno' 'learn --force' /bye"
# Check for user confirmation
read -p "Are you sure you want to execute this command? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
# Execute the command
gpg-connect-agent "scd serialno" "learn --force" /bye
else
# Do nothing
echo "Command not executed."
fi