mirror of
https://github.com/libretro/libretro-super
synced 2025-01-27 15:35:16 +00:00
libretro-buildbot-recipe.sh: Skip build if the .git directory is broken.
This commit is contained in:
parent
b0b4cf073e
commit
ccb6f9c685
@ -602,6 +602,12 @@ while read line; do
|
|||||||
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
||||||
BUILD="YES"
|
BUILD="YES"
|
||||||
UPDATE="NO"
|
UPDATE="NO"
|
||||||
|
else
|
||||||
|
HEAD="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" || \
|
||||||
|
{ echo 'git directory broken, removing $NAME and skipping.'; \
|
||||||
|
rm -rfv -- "$DIR" && continue; }
|
||||||
|
echo "pulling changes from repo $URL..."
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$DIR" || { echo "Failed to cd to ${DIR}, skipping ${NAME}"; continue; }
|
cd "$DIR" || { echo "Failed to cd to ${DIR}, skipping ${NAME}"; continue; }
|
||||||
@ -624,10 +630,6 @@ while read line; do
|
|||||||
BUILD="YES"
|
BUILD="YES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "pulling changes from repo $URL..."
|
|
||||||
HEAD="$(git rev-parse HEAD)"
|
|
||||||
git pull
|
|
||||||
|
|
||||||
if [ "$HEAD" = "$(git rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
if [ "$HEAD" = "$(git rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
||||||
BUILD="NO"
|
BUILD="NO"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user