less safety is better idk

This commit is contained in:
kat witch 2021-03-26 00:53:33 +00:00
parent 6ead6fbfea
commit 23e5dc8270
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72

View file

@ -1,10 +1,8 @@
#!/bin/bash
set -eu
set -o pipefail
gpg --card-status &> /dev/null;
if [ $? -eq 0 ]; then
user="$(gpg --card-status | grep "Login data" | awk '{print $NF}')";
if [ $? -eq 0 ] || [ $? -eq 2 ]; then
user="$(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
else
user=" Disconnected"
fi