Skip to content

Commit

Permalink
Build: Verify Sample[Custom].plist on build (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
PMheart authored Apr 17, 2022
1 parent 7036512 commit a7cb9c6
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion build_oc.tool
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

abort() {
echo "ERROR: $1!"
exit 1
}

buildutil() {
UTILS=(
"AppleEfiSignTool"
Expand Down Expand Up @@ -281,5 +286,19 @@ export NO_ARCHIVES

src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh) && eval "$src" || exit 1

cd Utilities/ocvalidate || exit 1
ocv_tool=""
if [ -x ./ocvalidate ]; then
ocv_tool=./ocvalidate
elif [ -x ./ocvalidate.exe ]; then
ocv_tool=./ocvalidate.exe
fi

if [ -x "$ocv_tool" ]; then
"$ocv_tool" ../../Docs/Sample.plist || abort "Wrong Sample.plist"
"$ocv_tool" ../../Docs/SampleCustom.plist || abort "Wrong SampleCustom.plist"
fi
cd ../..

cd Library/OcConfigurationLib || exit 1
./CheckSchema.py OcConfigurationLib.c || exit 1
./CheckSchema.py OcConfigurationLib.c || abort "Wrong OcConfigurationLib.c"

0 comments on commit a7cb9c6

Please sign in to comment.