Skip to content

Instantly share code, notes, and snippets.

@GuillaumeFalourd
Created February 4, 2022 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuillaumeFalourd/4efc73f1a6014b791c0ef223a023520a to your computer and use it in GitHub Desktop.
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.
#!/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 "{}"' \;
@GuillaumeFalourd
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment