Skip to content

Instantly share code, notes, and snippets.

@Blankwonder
Created April 5, 2017 03:46
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 Blankwonder/4b8eeabe67b282b2a866fdabb536a74b to your computer and use it in GitHub Desktop.
Save Blankwonder/4b8eeabe67b282b2a866fdabb536a74b to your computer and use it in GitHub Desktop.
#!/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