From c927aa6c17c041f96e1089c0b863ee0082185f7a Mon Sep 17 00:00:00 2001 From: "hapax.io" <39811582+thehapax@users.noreply.github.com> Date: Sat, 23 Feb 2019 00:15:18 -0800 Subject: [PATCH] detect os and print corresponding QR command --- home.admin/97addMobileWalletZap.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/home.admin/97addMobileWalletZap.sh b/home.admin/97addMobileWalletZap.sh index 116db47..1c77e92 100755 --- a/home.admin/97addMobileWalletZap.sh +++ b/home.admin/97addMobileWalletZap.sh @@ -77,7 +77,21 @@ else lndconnect --host=${dynDomain} fi -echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished." + +platform='unknown' +unamestr=`uname` +if [[ "$unamestr" == 'Linux' ]]; then + platform='linux' +elif [[ "$unamestr" == 'Darwin' ]]; then + platform='Darwin' # mac OSX +fi + +if [[ $platform == 'Linux' ]]; then + echo "(To shrink QR code: CTRL-) Press ENTER when finished." +elif [[ $platform == 'Darwin' ]]; then + echo "(To shrink QR code: CMD-) Press ENTER when finished." +fi + read key clear