Chris@100: #!/bin/bash Chris@62: Chris@62: # Execute this from the top-level directory of the project (the one Chris@62: # that contains the .app bundle). Supply the name of the .app bundle Chris@62: # as argument Chris@62: dir="$1" Chris@62: if [ -z "$dir" ] || [ ! -d "$dir" ]; then Chris@62: echo "Usage: $0 " Chris@62: echo "Where pkgdir is the directory containing .app" Chris@62: echo "All .app bundles in pkgdir will be signed" Chris@62: exit 2 Chris@62: fi Chris@62: for app in "$dir"/*.app; do Chris@100: find "$app" -name Qt\* -print | while read fr; do Chris@100: codesign -s "Developer ID Application: Chris Cannam" -fv "$fr" Chris@100: done Chris@100: find "$app" -name \*.dylib -print | while read fr; do Chris@100: codesign -s "Developer ID Application: Chris Cannam" -fv "$fr" Chris@100: done Chris@207: codesign -s "Developer ID Application: Chris Cannam" -fv "$app/Contents/MacOS/Tony.bin" Chris@62: codesign -s "Developer ID Application: Chris Cannam" -fv \ Chris@100: --requirements '=designated => identifier "uk.ac.qmul.eecs.c4dm.Tony" and ( (anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "M2H8666U82"))' \ Chris@62: "$app" Chris@62: done Chris@62: