mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-26 18:12:34 +08:00
Updated update.sh from iceman1001/proxmark3 - by joanbono
This commit is contained in:
parent
39c4548bf3
commit
cbe74d8400
1 changed files with 21 additions and 3 deletions
24
update.sh
24
update.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function wait4proxmark {
|
function wait4proxmark_Linux {
|
||||||
echo >&2 "Waiting for Proxmark to appear..."
|
echo >&2 "Waiting for Proxmark to appear..."
|
||||||
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
|
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
|
||||||
sleep .1
|
sleep .1
|
||||||
|
@ -10,5 +10,23 @@ function wait4proxmark {
|
||||||
echo $PM3
|
echo $PM3
|
||||||
}
|
}
|
||||||
|
|
||||||
# flash bootroom & system image
|
function wait4proxmark_macOS {
|
||||||
client/flasher $(wait4proxmark) -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf
|
echo >&2 "Waiting for Proxmark to appear..."
|
||||||
|
while true; do
|
||||||
|
PM3=$(ls /dev/pm3-* /dev/cu.usbmodem* 2>/dev/null | head -1)
|
||||||
|
if [[ $PM3 != "" ]]; then
|
||||||
|
#echo >&2 -e "Found proxmark on $(ls /dev/pm3-* /dev/cu.usbmodem* 2>/dev/null | head -1)\n"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep .1
|
||||||
|
done
|
||||||
|
echo $PM3
|
||||||
|
}
|
||||||
|
|
||||||
|
# Detect OS and flash bootroom & system image
|
||||||
|
|
||||||
|
if [[ $(uname | awk '{print toupper($0)}') == "LINUX" ]]; then
|
||||||
|
client/flasher $(wait4proxmark_Linux) -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf
|
||||||
|
elif [[ $(uname | awk '{print toupper($0)}') == "DARWIN" ]]; then
|
||||||
|
client/flasher $(wait4proxmark_macOS) -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue