#!/bin/bash for file in google-earth-stable_current_i386.deb google-earth-stable_current_amd64.deb; do ETAG=$(curl -s --head "http://dl.google.com/linux/direct/$file" | grep ETag) if ! grep -qs "$ETAG" "$file.etag"; then wget "http://dl.google.com/linux/direct/$file" -O "$file" echo "$ETAG" > "$file.etag" fi done