Skip to content

Commit

Permalink
warn if running install scritps from git tree
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperq committed Jan 31, 2025
1 parent bb7eacd commit 65cfa2b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion dist/install-linux.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -12,6 +19,5 @@ else
export ADB=`which adb`
fi

export SERIAL_PATH="./serial-ubuntu-latest/serial"
. "$(dirname "$0")"/install-common.sh
install
9 changes: 7 additions & 2 deletions dist/install-mac.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -12,6 +18,5 @@ else
export ADB=`which adb`
fi

export SERIAL_PATH="./serial-macos-latest/serial"
. "$(dirname "$0")"/install-common.sh
install

0 comments on commit 65cfa2b

Please sign in to comment.