[presubmit] Always install into local dir

Installing the package locally makes it easier to swap
in preleases for testing.

Bug: 390427892
Change-Id: I1487a3fbf8b568207050bd9b71a375f6f16b4bfe
Reviewed-on: https://fuchsia-review.googlesource.com/c/rsclient/+/1372782
Reviewed-by: Aaron Wood <aaronwood@google.com>
Fuchsia-Auto-Submit: David Fang <fangism@google.com>
Commit-Queue: David Fang <fangism@google.com>
diff --git a/scripts/infra/presubmit.sh b/scripts/infra/presubmit.sh
index 16d0363..996dba6 100755
--- a/scripts/infra/presubmit.sh
+++ b/scripts/infra/presubmit.sh
@@ -56,10 +56,16 @@
 # Test
 run_bazel test --test_timeout=10 --test_output=errors "${universe[@]}"
 
+# Install
+# Unpack the tarball for packaging and local testing.
+readonly temp_dir="tmp_rsclient_unpack"
+rm -rf "${temp_dir}"
+mkdir -p "$temp_dir"
+tar -xf "${RSCLIENT_TAR_PATH}" -C "$temp_dir"
+echo "Unpacked ${RSCLIENT_TAR_PATH} to ${temp_dir}."
+
 # Emit yaml manifest JSON if requested.
 if [[ -n "${CIPD_YAML_MANIFEST}" ]]; then
-  readonly temp_dir="tmp_rsclient_unpack"
-  rm -rf "${temp_dir}"
   readonly unpacked_cipd_yaml="${temp_dir}/cipd.yaml"
 
   echo "Writing cipd yaml manifest to ${CIPD_YAML_MANIFEST}"
@@ -84,10 +90,6 @@
   fi
 
   # cipd tool will expect package contents relative to the cipd.yaml file.
-  # Unpack to a temporary directory, and place the cipd.yaml file there.
-  echo "Unpacking ${RSCLIENT_TAR_PATH} for packaging into ${temp_dir}."
-  mkdir -p "$temp_dir"
-  tar -xf "${RSCLIENT_TAR_PATH}" -C "$temp_dir"
   cp "${CIPD_YAML_PATH}" "${unpacked_cipd_yaml}"
   chmod u+w "${unpacked_cipd_yaml}"
   echo "Prepared ${temp_dir} for cipd packaging."