From 35b6c40c355e894b86a62b766a92809027e61008 Mon Sep 17 00:00:00 2001 From: Midgard <2885-Midgard@users.noreply.framagit.org> Date: Wed, 26 Jul 2023 18:22:11 +0200 Subject: [PATCH] [bin/qrwifi] Show overview of info in QR code --- bin/qrwifi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/qrwifi b/bin/qrwifi index 8b2565b..cb02e8d 100755 --- a/bin/qrwifi +++ b/bin/qrwifi @@ -30,14 +30,11 @@ if [ -z "$pw" ]; then echo "Couldn't find password for network \`$ssid\`" echo "Use $0 " to share a specific SSID and password exit 1 -else - echo "Sharing network \`$ssid\`" fi -if [ -z "$ssid" ] || [ -z "$pw" ]; then - echo "Missing SSID or password" - exit 1 -fi +echo "$(tput bold)SSID$(tput sgr0) $ssid" +echo "$(tput bold)Password$(tput sgr0) $pw" + if printf '%s' "$pw" | grep -qF ';'; then echo "Password contains ;, I didn't look up how to handle that case" exit 1