feat(scripts): allow generating a QR code from a filename

Instead of returning an error, use the filename to generate the QR code.
This commit is contained in:
Austin English 2023-01-27 12:56:36 -06:00 committed by 4s3ti
parent f1d0d974b2
commit c1097ca69c

View file

@ -88,6 +88,13 @@ for CLIENT_NAME in "${CLIENTS_TO_SHOW[@]}"; do
qrencode -t "${encoding}" < "${CLIENT_NAME}.conf"
echo "====================================================================="
elif [[ -f "${CLIENT_NAME}" ]]; then
echo -e "::: Showing client \e[1m${CLIENT_NAME}\e[0m below"
echo "====================================================================="
qrencode -t "${encoding}" < "${CLIENT_NAME}"
echo "====================================================================="
else
echo -e "::: \e[1m${CLIENT_NAME}\e[0m does not exist"