| 1 | #!/bin/sh |
| 2 | URL="http://git.auf.org/?p=progfou.git;a=blob_plain;f=wcs/" |
| 3 | |
| 4 | update_scripts() { |
| 5 | url="$1" ; dir="$2" ; shift 2 |
| 6 | scripts="$@" |
| 7 | [ "`id -un`" = "root" ] && cd "${dir}" |
| 8 | for script in ${scripts} ; do |
| 9 | if wget -q -O "tmp.${script}" "${url}${script}" ; then |
| 10 | if ! cmp -s "tmp.${script}" "${script}" ; then |
| 11 | echo "Mise à jour de '${script}'..." |
| 12 | cat "tmp.${script}" > "${script}" |
| 13 | fi |
| 14 | else |
| 15 | echo "Script '${script}' indisponible !?" |
| 16 | fi |
| 17 | rm -f "tmp.${script}" |
| 18 | done |
| 19 | } |
| 20 | |
| 21 | update_scripts "$URL" /usr/local/sbin update-wcs-scripts wcs-extract wcs-extract-all |
| 22 | update_scripts "$URL" /usr/local/lib list2form.py wcs-dynexport |