Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
SOURCE=${SOURCE:-cartoon-dev}
TARGET=${TARGET:-cb-live}
FILES=(cards.xml cards_finalform.xml cards_mythic.xml levels.xml combos.xml missions.xml)
ENDPOINT="http://%s.synapse-games.com/assets/%s"
get_diff() {
declare file=$1
local source=$(printf "$ENDPOINT" "$SOURCE" "$file")
local target=$(printf "$ENDPOINT" "$TARGET" "$file")
diff -w --unified=5 <(curl -s "$target") <(curl -s "$source")
}
main() {
for file in ${FILES[@]}; do
local diff=$(get_diff "$file")
if [ -n "$diff" ]; then
echo "Differences in $file"
echo "$diff"
fi
done
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.