Sync capstone if not at correct commit

This commit is contained in:
Mohamed Lemine Ould El-Hadj 2022-11-02 22:02:21 -04:00 committed by pancake
parent 1816fa0ad4
commit 8046def6b1
2 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ capstone-sync:
ifeq ($(WITHOUT_PULL),1)
@echo "Nothing to sync because of --without-pull"
else
if [ ! -d capstone ]; then \
if [ ! -d capstone ] || [ $(shell [ -d capstone/.git ] && git --git-dir capstone/.git rev-parse HEAD) != $(CS_TIP) ]; then \
"$(SHELL)" capstone.sh "${CS_URL}" "${CS_BRA}" "${CS_TIP}" "${CS_REV}" "${CS_ARCHIVE_URL}" ; \
fi
endif

View File

@ -127,7 +127,7 @@ if [ -z "${CS_ARCHIVE}" ]; then
fi
fi
if [ -d capstone ]; then
if [ -d capstone -a ! -d capstone/.git ] || [ "$(git --git-dir capstone/.git rev-parse --verify HEAD > /dev/null 2>&1)" = ${CS_TIP} ]; then
echo "[capstone] Nothing to do"
exit 0
fi