#!/bin/sh URL="http://git.auf.org/?p=progfou.git;a=blob_plain;f=wcs/" update_scripts() { url="$1" ; dir="$2" ; shift 2 scripts="$@" [ "`id -un`" = "root" ] && cd "${dir}" for script in ${scripts} ; do if wget -q -O "tmp.${script}" "${url}${script}" ; then if ! cmp -s "tmp.${script}" "${script}" ; then echo "Mise à jour de '${script}'..." cat "tmp.${script}" > "${script}" fi else echo "Script '${script}' indisponible !?" fi rm -f "tmp.${script}" done } update_scripts "$URL" /usr/local/sbin update-wcs-scripts wcs-extract wcs-extract-all update_scripts "$URL" /usr/local/lib list2form.py wcs-dynexport