From 87e6b2963b4aae2e897a10cdc1cc29575f17c35d Mon Sep 17 00:00:00 2001 From: orbea Date: Fri, 22 Dec 2017 15:38:31 -0800 Subject: [PATCH] libretro-buildbot-recipe.sh: Only clean the correct git directory. --- libretro-buildbot-recipe.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 9f56b5a4..6506c83a 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -663,12 +663,8 @@ while read line; do LEIRADEL ) build_libretro_leiradel_makefile $NAME $DIR $SUBDIR $MAKEFILE ${PLATFORM} "${ARGS}" ;; * ) : ;; esac - BUILD_DIR="${BASE_DIR}/${DIR}" - [ "${SUBDIR}" != . ] && BUILD_DIR="${BUILD_DIR}/${SUBDIR}" - if [ "$(realpath .)" = "${BUILD_DIR}" ]; then - echo "Cleaning repo state after build $URL..." - git clean -xdf - fi + echo "Cleaning repo state after build $URL..." + git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf else echo "buildbot job: building $NAME up-to-date" fi