From 26a6737cdd43443f9cc30c853014a2d37a5f36c8 Mon Sep 17 00:00:00 2001 From: Matthew Lopez <73856503+MatthewL246@users.noreply.github.com> Date: Sun, 19 May 2024 15:39:25 -0400 Subject: [PATCH] Set default script directory to git_base_dir --- scripts/internal/framework.sh | 1 + scripts/setup-submodule-patches.sh | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/internal/framework.sh b/scripts/internal/framework.sh index 7882679..d8e24c8 100644 --- a/scripts/internal/framework.sh +++ b/scripts/internal/framework.sh @@ -20,6 +20,7 @@ fi # Provide the Git base directory framework_dir="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" git_base_dir="$(cd "$framework_dir" && git rev-parse --show-toplevel)" +cd "$git_base_dir" # Terminal styling codes term_reset=$(tput sgr0) diff --git a/scripts/setup-submodule-patches.sh b/scripts/setup-submodule-patches.sh index 330ee3a..3e15cda 100755 --- a/scripts/setup-submodule-patches.sh +++ b/scripts/setup-submodule-patches.sh @@ -8,8 +8,6 @@ use this if you're trying to update the submodules to a newer version than is su be applied first with --reject, and if that fails, a 3-way merge will be attempted." parse_arguments "$@" -cd "$git_base_dir" - print_info "Resetting all submodules..." git submodule sync >/dev/null git submodule foreach "git reset --hard" >/dev/null