[embedder] Start the repository server in run.

Saves the user an extra step (although ultimately
this should be handled by the Bazel SDK).

Change-Id: Ifa10ff8b512212dfbe8a6efdf7a05250a387fd42
Fixed: 114138
Reviewed-on: https://fuchsia-review.googlesource.com/c/flutter-embedder/+/753198
Reviewed-by: Filip Filmar <fmil@google.com>
diff --git a/scripts/build_and_run_example.sh b/scripts/build_and_run_example.sh
index edaf0f5..b09aada 100755
--- a/scripts/build_and_run_example.sh
+++ b/scripts/build_and_run_example.sh
@@ -103,14 +103,14 @@
   "${FUCHSIA_EMBEDDER_DIR}"/scripts/build_and_copy_engine_artifacts.sh ${goma_flags}
 fi
 
-pushd "${FUCHSIA_EMBEDDER_DIR}"
-
 echo-info "Building Flutter sample app bundle."
-cd "${FUCHSIA_EMBEDDER_DIR}"/src/examples/"${app_name}"
+pushd "${FUCHSIA_EMBEDDER_DIR}"/src/examples/"${app_name}"
 "${FUCHSIA_EMBEDDER_DIR}"/tools/flutter build bundle
+popd  # "${FUCHSIA_EMBEDDER_DIR}"/src/examples/"${app_name}"
 
 echo-info "Running Flutter sample app."
-cd "${FUCHSIA_EMBEDDER_DIR}"
+pushd "${FUCHSIA_EMBEDDER_DIR}"
+"${FUCHSIA_EMBEDDER_DIR}"/tools/ffx repository server start
 "${FUCHSIA_EMBEDDER_DIR}"/tools/bazel run --config=fuchsia_x64 //src/examples/"${app_name}":"${app_name}"_pkg.component ${session_args}
 
 echo-info "Package contents for debugging:"