Set default script directory to git_base_dir

This commit is contained in:
Matthew Lopez
2024-05-19 15:39:25 -04:00
parent da0f0bbf0f
commit 26a6737cdd
2 changed files with 1 additions and 2 deletions

View File

@@ -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)

View File

@@ -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