Created
June 29, 2012 22:30
-
-
Save msullivan/3021073 to your computer and use it in GitHub Desktop.
helper script for making snapshots
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
#!/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