diff --git a/dist/install-linux.sh b/dist/install-linux.sh index cd263c8..55204ab 100755 --- a/dist/install-linux.sh +++ b/dist/install-linux.sh @@ -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 diff --git a/dist/install-mac.sh b/dist/install-mac.sh index 88d1409..24dacdd 100755 --- a/dist/install-mac.sh +++ b/dist/install-mac.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash - set -e + +export SERIAL_PATH="./serial-macos-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 at 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 +18,5 @@ else export ADB=`which adb` fi -export SERIAL_PATH="./serial-macos-latest/serial" . "$(dirname "$0")"/install-common.sh install