diff --git a/Tools/scripts/cygwin_build.sh b/Tools/scripts/cygwin_build.sh index 7761bd5ae3..2f23ab48c9 100755 --- a/Tools/scripts/cygwin_build.sh +++ b/Tools/scripts/cygwin_build.sh @@ -17,8 +17,19 @@ $GPP_COMPILER -print-sysroot SYS_ROOT=$($GPP_COMPILER -print-sysroot) echo "SYS_ROOT=$SYS_ROOT" -git config --global --add safe.directory /cygdrive/d/a/ardupilot/ardupilot +REPO_NAME=$(basename $(git rev-parse --show-toplevel)) +# Change ownership and permissions +chown -R $USER "/cygdrive/d/a/$REPO_NAME/$REPO_NAME" +chmod -R 755 "/cygdrive/d/a/$REPO_NAME/$REPO_NAME" + +echo "Repository name: $REPO_NAME" + +git config --global --add safe.directory "/cygdrive/d/a/$REPO_NAME/$REPO_NAME" + +echo "Repository name: $REPO_NAME" + +git config --global --add safe.directory "/cygdrive/d/a/$REPO_NAME/$REPO_NAME" rm -rf artifacts mkdir artifacts