#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" # shellcheck source=scripts/local-debug/env.sh source "$ROOT_DIR/scripts/local-debug/env.sh" case "$LOCAL_DEBUG_ROOT" in "$ROOT_DIR/.local-debug" | /private/tmp/browser-local-debug-* | /tmp/browser-local-debug-*) ;; *) printf 'refusing to reset unexpected LOCAL_DEBUG_ROOT: %s\n' "$LOCAL_DEBUG_ROOT" >&2 printf 'allowed roots: %s/.local-debug, /private/tmp/browser-local-debug-*, /tmp/browser-local-debug-*\n' "$ROOT_DIR" >&2 exit 1 ;; esac "$ROOT_DIR/scripts/dev-stop.sh" printf 'deleting local debug root only: %s\n' "$LOCAL_DEBUG_ROOT" rm -rf "$LOCAL_DEBUG_ROOT" printf 'local debug reset complete\n'