warn if running install scritps from git tree

This commit is contained in:
Cooper Quintin
2025-01-31 15:46:35 -08:00
committed by Will Greenberg
parent d016279172
commit 107ba58296
2 changed files with 14 additions and 3 deletions

View File

@@ -1,6 +1,13 @@
#!/bin/env bash
set -e
export SERIAL_PATH="./serial-ubuntu-latest/serial"
if [ ! -x "$SERIAL_PATH" ]; then
echo "The serial binary cannot be found at $SERIAL_PATH. If you are running this from the git tree please instead run it from the latest release bundle https://github.com/EFForg/rayhunter/releases"
exit 1
fi
if ! command -v adb &> /dev/null; then
if [ ! -d ./platform-tools ] ; then
echo "adb not found, downloading local copy"
@@ -12,6 +19,5 @@ else
export ADB=`which adb`
fi
export SERIAL_PATH="./serial-ubuntu-latest/serial"
. "$(dirname "$0")"/install-common.sh
install