Skip to content

Instantly share code, notes, and snippets.

@gorbster
Created January 27, 2012 19:06
Show Gist options
  • Save gorbster/1690376 to your computer and use it in GitHub Desktop.
Save gorbster/1690376 to your computer and use it in GitHub Desktop.
Find a matching dSYM UUID in the Spotlight index
#!/bin/bash
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "1 argument (UUID) required, $# provided"
MDFIND=/usr/bin/mdfind
UUID=`echo ${1} |
sed -e 's/\([a-z0-9]\{8\}\)\([a-z0-9]\{4\}\)\([a-z0-9]\{4\}\)\([a-z0-9]\{4\}\)\([a-z0-9]\{12\}\)/\1-\2-\3-\4-\5/' | \
awk '{print toupper($0)}'`
${MDFIND} "com_apple_xcode_dsym_uuids = ${UUID}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment