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