-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsign
More file actions
executable file
·21 lines (15 loc) · 773 Bytes
/
sign
File metadata and controls
executable file
·21 lines (15 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#
# Copyright (c) 2015 Roderick W. Smith.
# Copyright (c) 2021 profzei.
# Copyright (c) 2024 null2264.
# SPDX-License-Identifier: GPL-3.0-only
#
# Extracted from: https://github.com/perez987/OpenCore-and-UEFI-Secure-Boot/blob/1.0.7/guide/WSL%20Ubuntu%20VM%20on%20Windows.md#signing-opencore-files
#
. ./signing-common # import execute
export -f execute
[ -f "./ISK.key" ] || { echo "ISK.key not found, cancelling..."; exit 1; }
[ -f "./ISK.pem" ] || { echo "ISK.pem not found, cancelling..."; exit 1; }
[ -z "$1" ] && { echo "Usage: sign [glob]"; exit 1; }
find $@ -type f -name "*.efi" ! -name '.*' | cut -c 3- | xargs -I{} bash -c 'execute sbsign --key ISK.key --cert ISK.pem --output $(mkdir -p $(dirname "./Signed/$@") | echo "./Signed/$@") ./$@' _ {}