Skip to content

Instantly share code, notes, and snippets.

@msullivan
Created July 31, 2012 17:19
Show Gist options
  • Save msullivan/3218674 to your computer and use it in GitHub Desktop.
Save msullivan/3218674 to your computer and use it in GitHub Desktop.
script to help make snapshot info
#!/bin/bash
# Hacky script to assist in updating the snapshot files.
# Give it the log urls as arguments for the snap-stage3 builds and it
# will produce something to paste into snapshots.txt.
STRINGS=$(for URL in "$@"
do
FNAME=${URL/html/txt}
wget -q -O- "$FNAME" | sed 's/\\n/\n/g'| grep 'Public URL' | cut -d- -f5- | cut -d. -f1
done)
DATE=$(echo $STRINGS | cut -d- -f1-3)
REV=$(echo $STRINGS | cut -d- -f4)
echo "S $DATE $REV"
for NUB in $STRINGS
do
PLATFORM=$(echo $NUB | cut -d- -f5-6)
ID=$(echo $NUB | cut -d- -f7)
echo " $PLATFORM $ID"
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment