Skip to content

Instantly share code, notes, and snippets.

@satreix
Created June 1, 2015 23:56
Show Gist options
  • Save satreix/d30e49ca2e393a4373b3 to your computer and use it in GitHub Desktop.
Save satreix/d30e49ca2e393a4373b3 to your computer and use it in GitHub Desktop.
#!/bin/sh
ret=1
SUMS="md5sums.txt"
OLD_SUMS=".latest_arch"
rm -rf $SUMS
wget http://archlinux.polymorf.fr/iso/latest/$SUMS 2> /dev/null
if [ ! -f $OLD_SUMS ]; then
echo build
ret=0
else
diff $SUMS $OLD_SUMS > /dev/null
if [ $? -eq 1 ]; then
echo build
ret=0
fi
fi
mv $SUMS $OLD_SUMS
exit $ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment