Skip to content

Commit

Permalink
efibuild: Add support for DISCARD_SUBMODULES
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebeaton committed Nov 8, 2023
1 parent 44d21db commit a5982d2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions efibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ prompt() {
fi
}

setcommitauthor() {
git config user.name ocbuild
git config user.email ocbuild@acidanthera.local
git config commit.gpgsign false
}

updaterepo() {
if [ ! -d "$2" ]; then
git clone "$1" -b "$3" --depth=1 "$2" || exit 1
Expand All @@ -47,6 +53,13 @@ updaterepo() {
exit 1
fi
fi
if [ "$2" = "UDK" ] && [ "$DISCARD_SUBMODULES" != "" ]; then
setcommitauthor
for module_to_discard in "${DISCARD_SUBMODULES[@]}" ; do
git rm "${module_to_discard}"
done
git commit -m "Discarded submodules"
fi
git submodule update --init --recommend-shallow || exit 1
popd >/dev/null || exit 1
}
Expand Down Expand Up @@ -393,9 +406,7 @@ fi
if [ "$NEW_BUILDSYSTEM" != "1" ]; then
if [ -d ../Patches ]; then
if [ ! -f patches.ready ]; then
git config user.name ocbuild
git config user.email ocbuild@acidanthera.local
git config commit.gpgsign false
setcommitauthor
for i in ../Patches/* ; do
git apply --ignore-whitespace "$i" || exit 1
git add .
Expand Down

0 comments on commit a5982d2

Please # to comment.