Created
February 4, 2022 18:31
-
-
Save GuillaumeFalourd/4efc73f1a6014b791c0ef223a023520a to your computer and use it in GitHub Desktop.
Bash script to sign all files and subfiles located in the the same folder than the script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEVELOPER_ID_APP=$1 | |
export "DEVELOPER_ID_APP=$DEVELOPER_ID_APP" | |
signFile() { | |
filename=$1 | |
echo "Signing FILE: $filename" | |
codesign -s "$DEVELOPER_ID_APP" -f --timestamp -i <ANY_BUNDLE_ID> -o runtime "$filename" | |
} | |
export -f signFile | |
find . -exec bash -c 'signFile "{}"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Call the script by using
sh codesign.sh $DEVELOPER_ID_APPLICATION
The Developer Id Application variable should look like this:
Developer Id Application: <Name> (123456789)