Skip to content

Instantly share code, notes, and snippets.

@kennberg
Created June 4, 2013 06:34
Show Gist options
  • Save kennberg/5704000 to your computer and use it in GitHub Desktop.
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.
# 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