$ cat test.sh
#! /bin/bash
if [ -f /home/amnesia/Persistent/yubikey-manager-qt.AppImage ]; then
ykman="/home/amnesia/Persistent/yubikey-manager-qt.AppImage ykman"
elif [ -f /Applications/YubiKey\ Manager.app/Contents/MacOS/ykman ]; then
ykman="/Applications/YubiKey\ Manager.app/Contents/MacOS/ykman"
else
printf "$bold$red%s$normal\n" "Could not find YubiKey Manager binary"
exit 1
fi
$ykman list
$ test.sh
./test.sh: line 12: /Applications/YubiKey\: No such file or directory
./test.sh: line 12: /Applications/YubiKey: No such file or directory
How can I fix above error?
Using following approach solves issue on macOS but breaks things on Tails because of ykman
AppImage requirement.
$ cat test.sh
#! /bin/bash
if [ -f /home/amnesia/Persistent/yubikey-manager-qt.AppImage ]; then
ykman="/home/amnesia/Persistent/yubikey-manager-qt.AppImage ykman"
elif [ -f /Applications/YubiKey\ Manager.app/Contents/MacOS/ykman ]; then
ykman="/Applications/YubiKey Manager.app/Contents/MacOS/ykman"
else
printf "$bold$red%s$normal\n" "Could not find YubiKey Manager binary"
exit 1
fi
"$ykman" list
$ test.sh
./test.sh: line 12: /home/amnesia/Persistent/yubikey-manager-qt.AppImage ykman: No such file or directory
./test.sh: line 12: /home/amnesia/Persistent/yubikey-manager-qt.AppImage ykman: No such file or directory
Thanks for helping out!