Skip to content

Commit

Permalink
build: fix patch.sh when there are no patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jarnedemeulemeester committed May 7, 2023
1 parent 2c05448 commit 4b9bd35
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions buildscripts/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ PATCHES=(patches/*)
ROOT=$(pwd)

for dep_path in "${PATCHES[@]}"; do
patches=($dep_path/*)
dep=$(echo $dep_path |cut -d/ -f 2)
cd deps/$dep
echo Patching $dep
git reset --hard
for patch in "${patches[@]}"; do
echo Applying $patch
git apply "$ROOT/$patch"
done
cd $ROOT
if [ -d "$dep_path" ]; then
patches=($dep_path/*)
dep=$(echo $dep_path |cut -d/ -f 2)
cd deps/$dep
echo Patching $dep
git reset --hard
for patch in "${patches[@]}"; do
echo Applying $patch
git apply "$ROOT/$patch"
done
cd $ROOT
fi
done

exit 0

0 comments on commit 4b9bd35

Please sign in to comment.