Update commit check in init_deps.sh

This commit is contained in:
Théophile Diot 2024-01-12 14:13:46 +00:00
parent bc2af48a7d
commit 8c2d0b98d8
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -52,8 +52,8 @@ do
post="yes"
else
echo "⚠️ Skipping clone of $url because target directory is already present"
# Check if the commit is already present
if [ "$(git rev-parse "$commit" 2>/dev/null)" != "$commit" ] ; then
# Check if the commit is already present in the subtree
if [ "$(echo "$(git log -n 1 --oneline HEAD)" | cut -c1-9)" != "$(echo "$commit" | cut -c1-9)" ] ; then
echo " Updating ${name} from $url at commit/version $commit"
do_and_check_cmd git subtree pull --prefix "src/deps/src/$id" "$url" "$commit" --squash
post="yes"