Fix error where bad commit ID breaks the build script (#22)

This commit is contained in:
Grant Olson 2023-09-22 02:19:56 -04:00 committed by GitHub
parent f21fd77a47
commit 0defcf7c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,11 +50,15 @@ do
if [ ! -d layers/$layer/.git ] if [ ! -d layers/$layer/.git ]
then then
echo "Cloning $layer" echo "Cloning $layer"
git clone -q $repo layers/$layer && cd layers/$layer && git checkout -q $branch && git checkout -q $srcrev && cd ../.. git clone -q $repo layers/$layer && cd layers/$layer
git checkout -q $branch && git checkout -q $srcrev
cd ../..
else else
if [ $NOSYNC -eq 0 ]; then if [ $NOSYNC -eq 0 ]; then
echo "Updating $layer to $srcrev" echo "Updating $layer to $srcrev"
cd layers/$layer && git fetch -q && git checkout -q $branch && git checkout -q $srcrev && cd ../.. cd layers/$layer
git fetch -q && git checkout -q $branch && git checkout -q $srcrev
cd ../..
fi fi
fi fi
done done