Add check to jevois deploy script for on master.

Still allows the use to override, but may force them to consider where
they are deploying from.

Change-Id: I6518bfe03a8e95b8e0921888f37200e5feb9a95b
diff --git a/y2019/vision/tools/deploy.sh b/y2019/vision/tools/deploy.sh
index 3c16b03..a57866d 100755
--- a/y2019/vision/tools/deploy.sh
+++ b/y2019/vision/tools/deploy.sh
@@ -1,6 +1,19 @@
-#!/bin/sh
+#!/bin/bash
 set -e
 
+BRANCH=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
+if [[ "$BRANCH" != "master" ]]; then
+  read -p "Not on master, deploy anyway (y/n) " ANSWER
+  if [[ $ANSWER =~ ^[Yy]$ ]]; then
+    echo "Master check overridden, deploying anyway"
+  else
+    echo "Cancelling deploy"
+    exit 1
+  fi
+else
+  echo "On master, deploying"
+fi
+
 echo "Building executables"
 readonly BAZEL_OPTIONS="-c opt --cpu=armhf-debian"
 readonly BAZEL_BIN="$(bazel info ${BAZEL_OPTIONS} bazel-bin)"