#!/usr/bin/env bash
set -euo pipefail

# /WORKSPACE_ROOT/scripts/setup
setup_dir="$( (builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) )"
# /WORKSPACE_ROOT
root_dir="$(dirname "$(dirname "$setup_dir")")"

(
  builtin cd "$root_dir"
  # The setup script will use ZOOX_WORKSPACE_ROOT to find the ansible scripts
  # directory, or fallback to a path relative to the script if it is not set.
  # Unsetting this environment variable will allow us to support multiple
  # workspaces on the same machine (common dev workflow) by forcing the setup
  # script to search for the ansible directory.
  unset ZOOX_WORKSPACE_ROOT
  ./scripts/setup/setup.py "$@"
)
