-
Notifications
You must be signed in to change notification settings - Fork 18
/
macbuild.tool
executable file
·33 lines (29 loc) · 996 Bytes
/
macbuild.tool
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
package() {
if [ ! -d "$1" ]; then
echo "Missing package directory"
exit 1
fi
local ver=$(cat Include/Protocol/OcQuirks.h | grep OCQUIRKS_PROTOCOL_REVISION | cut -f4 -d' ' | cut -f2 -d'"' | grep -E '^[0-9.]+$')
if [ "$ver" = "" ]; then
echo "Invalid version $ver"
fi
rm -rf "$1"/tmp || exit 1
mkdir -p "$1"/tmp/Drivers || exit 1
cp OcQuirks.plist "$1"/tmp/Drivers || exit 1
pushd "$1" || exit 1
cp OcQuirks.efi tmp/Drivers/ || exit 1
cp OpenRuntime.efi tmp/Drivers/ || exit 1
pushd tmp || exit 1
zip -qry -FS ../"OcQuirks-${ver}-${2}.zip" * || exit 1
popd || exit 1
rm -rf tmp || exit 1
popd || exit 1
}
cd $(dirname "$0")
ARCHS=(X64)
SELFPKG=OcQuirks
DEPNAMES=('EfiPkg' 'OpenCorePkg')
DEPURLS=('https://github.com/acidanthera/EfiPkg' 'https://github.com/acidanthera/OpenCorePkg')
DEPBRANCHES=('master' 'master')
src=$(/usr/bin/curl -Lfs https://raw.github.com/acidanthera/ocbuild/master/efibuild.sh) && eval "$src" || exit 1