mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
allow case-insensitive match of WSL strings
This commit is contained in:
parent
fe98b3821f
commit
ce85fe0099
1 changed files with 3 additions and 2 deletions
5
pm3
5
pm3
|
@ -69,7 +69,7 @@ function get_pm3_list_Linux {
|
||||||
fi
|
fi
|
||||||
# WSL2 with usbipd detection - doesn't report same things as WSL1
|
# WSL2 with usbipd detection - doesn't report same things as WSL1
|
||||||
if grep -q "proxmark.org" "/sys/class/tty/${DEV#/dev/}/../../../manufacturer" 2>/dev/null; then
|
if grep -q "proxmark.org" "/sys/class/tty/${DEV#/dev/}/../../../manufacturer" 2>/dev/null; then
|
||||||
if !( echo "${PM3LIST[*]}" | grep -q "${DEV}" ); then
|
if echo "${PM3LIST[*]}" | grep -qv "${DEV}"; then
|
||||||
PM3LIST+=("$DEV")
|
PM3LIST+=("$DEV")
|
||||||
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
||||||
return
|
return
|
||||||
|
@ -475,7 +475,8 @@ fi
|
||||||
|
|
||||||
HOSTOS=$(uname | awk '{print toupper($0)}')
|
HOSTOS=$(uname | awk '{print toupper($0)}')
|
||||||
if [ "$HOSTOS" = "LINUX" ]; then
|
if [ "$HOSTOS" = "LINUX" ]; then
|
||||||
if uname -a|grep -q Microsoft; then
|
# Detect when running under WSL1 (but exclude WSL2)
|
||||||
|
if uname -a | grep -qi Microsoft && uname -a | grep -qvi WSL2; then
|
||||||
# First try finding it using the PATH environment variable
|
# First try finding it using the PATH environment variable
|
||||||
PSHEXE=$(command -v powershell.exe 2>/dev/null)
|
PSHEXE=$(command -v powershell.exe 2>/dev/null)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue