Add build_and_run.sh to simplify building with bazel.

Currently pinned to swift 4.

Fixes #62

PiperOrigin-RevId: 219801714
diff --git a/README.md b/README.md
index 7f0759f..2a2a511 100644
--- a/README.md
+++ b/README.md
@@ -7,9 +7,7 @@
 
 ## Building and installing
 
-1.  Open src/Tulsi.xcodeproj, and within Xcode, build the **TulsiApp**.
-
-2.  Run the **TulsiApp**.
+1.  Run `build_and_run.sh`. This will install Tulsi.app inside ~/Applications.
 
 ## Notes
 
diff --git a/build_and_run.sh b/build_and_run.sh
new file mode 100755
index 0000000..8a8d43c
--- /dev/null
+++ b/build_and_run.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2018 The Tulsi Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# Helper script to invoke Tulsi in commandline mode.
+# The path to the Tulsi.app bundle may be provided though the TULSI_APP
+# environment variable. If it is not, the script will attempt to find
+# Tulsi using the first result returned by the Spotlight index.
+
+set -eu
+
+readonly unzip_dir="${1:-$HOME/Applications}"
+
+# build it
+bazel build //:tulsi --swiftcopt=-swift-version --swiftcopt=4
+# unzip it
+unzip -oq bazel-bin/tulsi.zip -d "$unzip_dir"
+# run it
+open "$unzip_dir/Tulsi.app"