#! /bin/sh
# vim: set filetype=sh:

mkdir tmp
cd tmp
wget --prefer-family=IPv4 -N \
  http://git.savannah.gnu.org/cgit/config.git/plain/config.guess \
  http://git.savannah.gnu.org/cgit/config.git/plain/config.sub \
  http://git.savannah.gnu.org/cgit/automake.git/plain/lib/install-sh \
  http://git.savannah.gnu.org/cgit/automake.git/plain/lib/missing \
  http://git.savannah.gnu.org/cgit/automake.git/plain/lib/mkinstalldirs
cd ..
echo ''
for FNAME in config.guess config.sub install-sh missing mkinstalldirs ; do
  cmp -s "$FNAME" "tmp/${FNAME}"
  if [ $? -eq 0 ]; then
    echo "... skipping $FNAME"
  else
    echo "... updating $FNAME"
    cp "tmp/${FNAME}" .
  fi
done
rm -rf tmp
