mirror of
https://github.com/stakwork/sphinx-key.git
synced 2026-01-31 21:34:19 +01:00
build: check for some installed bins before building
This commit is contained in:
23
deploy.sh
23
deploy.sh
@@ -1,6 +1,27 @@
|
||||
check_exists() {
|
||||
command -v "$1" > /dev/null
|
||||
}
|
||||
check_port() {
|
||||
cargo espflash board-info "$1" &> /dev/null
|
||||
}
|
||||
if ! check_exists esptool.py
|
||||
then
|
||||
echo "esptool.py not installed!"
|
||||
echo "install with this command: pip install esptool"
|
||||
exit 1
|
||||
fi
|
||||
if ! check_exists ldproxy
|
||||
then
|
||||
echo "ldproxy not installed!"
|
||||
echo "install with this command: cargo install ldproxy"
|
||||
exit 1
|
||||
fi
|
||||
if ! check_exists cargo-espflash
|
||||
then
|
||||
echo "cargo-espflash not installed!"
|
||||
echo "install with this command: cargo install cargo-espflash"
|
||||
exit 1
|
||||
fi
|
||||
for FILE in /dev/tty.*
|
||||
do
|
||||
if check_port $FILE
|
||||
@@ -9,10 +30,10 @@ do
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$PORT" ]
|
||||
then
|
||||
echo "ESP likely not connected! Exiting now."
|
||||
echo "Make sure the ESP is connected with a data USB cable, and try again."
|
||||
exit 1
|
||||
fi
|
||||
git pull
|
||||
|
||||
Reference in New Issue
Block a user