Merge pull request #1231 from Gator96100/master

Windows prioritise USB connections
This commit is contained in:
Iceman 2021-04-01 17:36:44 +02:00 committed by GitHub
commit 587b3cc718
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
pm3
View file

@ -157,7 +157,8 @@ function get_pm3_list_Windows {
exit 1
fi
fi
PM3LIST+=("$DEV")
#Prioritise USB connections
PM3LIST=("$DEV" "${PM3LIST[@]}")
if [ ${#PM3LIST[*]} -ge "$N" ]; then
return
fi
@ -211,7 +212,8 @@ function get_pm3_list_WSL {
exit 1
fi
fi
PM3LIST+=("$DEV")
#Prioritise USB connections
PM3LIST=("$DEV" "${PM3LIST[@]}")
if [ ! -w "$DEV" ]; then
echo "[!] Let's give users read/write access to $DEV"
sudo chmod 666 "$DEV"