Skip to content

Instantly share code, notes, and snippets.

@puppybits
Created May 18, 2012 16:23
Show Gist options
  • Save puppybits/2726204 to your computer and use it in GitHub Desktop.
Save puppybits/2726204 to your computer and use it in GitHub Desktop.
find if any dSYMs match a UUID
#!/bin/bash
# search for dSYMs for a full or partial UUID from a crash log.
# examples:
# ls-uuid.sh B533
# ls-uuid.sh B533 /Volumes/ProjectDrive/savedbuilds
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
FOLDER=~/Library/Developer/Xcode/Archives
CUSTOM=$2
dSYMs=$(find $FOLDER $CUSTOM -iname "*.dSYM")
FOUND=""
for f in $dSYMs
do
r=`dwarfdump -u "$f" | grep $1`
if [ -n "$r" ]; then
echo $r
FOUND="true"
fi
done
if [ -z "$FOUND" ]; then
echo "So sorry, no dSYM."
echo "Try using post-actions to commit dSYMs to the repo."
fi
IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment