From 64f9f95998d0f87a1da198af89c1d3ffe049223c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kelemen=20=28vudiq=29?= Date: Mon, 22 Mar 2021 22:30:45 +0100 Subject: [PATCH] get_git: check only folder, not files this prevents removal of potential archive files in the same sources subfolder for a package --- scripts/get_git | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/get_git b/scripts/get_git index dd8486bf34..15b2885ea2 100755 --- a/scripts/get_git +++ b/scripts/get_git @@ -72,8 +72,8 @@ fi GIT_FOUND="no" opwd="$(pwd)" -for d in "${SOURCES}/${1}/${1}-"* ; do - if [ -d "${d}/.git" ]; then +for d in "${SOURCES}/${1}/${1}-"*/ ; do + if [ -d "${d}.git" ]; then if [ "${GIT_FOUND}" = "no" ]; then cd "${d}" if [ "${PKG_URL}" = "$(git remote get-url origin)" ]; then @@ -117,7 +117,7 @@ cd "${opwd}" if [ "${GIT_FOUND}" = "no" ]; then build_msg "CLR_GET" "GIT CLONE" "${1}" git clone ${GIT_CLONE_PARAMS} "${PKG_URL}" "${PACKAGE}" -elif [ ! "${GIT_DIR}" = "${PACKAGE}" ]; then +elif [ ! "${GIT_DIR}" = "${PACKAGE}/" ]; then mv "${GIT_DIR}" "${PACKAGE}" fi