From 144d3d3b2d4ecb35726d601933e94af62a2d8ed5 Mon Sep 17 00:00:00 2001 From: Lokesh-Carbonix Date: Mon, 20 Nov 2023 14:42:09 -0800 Subject: [PATCH] wip --- Tools/scripts/cygwin_build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tools/scripts/cygwin_build.sh b/Tools/scripts/cygwin_build.sh index 2f23ab48c9..82d2089c21 100755 --- a/Tools/scripts/cygwin_build.sh +++ b/Tools/scripts/cygwin_build.sh @@ -17,6 +17,20 @@ $GPP_COMPILER -print-sysroot SYS_ROOT=$($GPP_COMPILER -print-sysroot) echo "SYS_ROOT=$SYS_ROOT" +echo "Script is running in: $(pwd)" + +# Check if Git is installed +if ! git --version > /dev/null 2>&1; then + echo "Error: Git is not installed." + exit 1 +fi + +# Check if the current directory is a Git repository +if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then + echo "Error: The current directory is not a Git repository." + exit 1 +fi + REPO_NAME=$(basename $(git rev-parse --show-toplevel)) # Change ownership and permissions