Created
June 4, 2013 06:34
-
-
Save kennberg/5704000 to your computer and use it in GitHub Desktop.
Bash script to generate MY_UUID for Pebble app and copy it into clipboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pebble UUID generator | |
function pebble_uuid { | |
uuid_string=`uuidgen | sed "s/-//g"` | |
uuid="#define MY_UUID {" | |
for i in {0..15}; do | |
if [ $i -ne 0 ]; then | |
uuid="$uuid," | |
fi | |
uuid="$uuid 0x${uuid_string:$[i*2]:2}" | |
done | |
uuid="$uuid }" | |
echo $uuid | |
echo $uuid | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment