Artifact
b70303fbb23153f072ca5e7d75728749bcf8c1b6:
0000: 23 21 20 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 #! /usr/bin/env
0010: 62 61 73 68 0a 0a 75 72 6c 73 3d 28 0a 09 68 74 bash..urls=(..ht
0020: 74 70 3a 2f 2f 63 68 69 73 65 6c 61 70 70 2e 63 tp://chiselapp.c
0030: 6f 6d 2f 75 73 65 72 2f 72 6b 65 65 6e 65 2f 72 om/user/rkeene/r
0040: 65 70 6f 73 69 74 6f 72 79 2f 61 75 74 6f 63 6f epository/autoco
0050: 6e 66 2f 64 6f 63 2f 74 72 75 6e 6b 2f 74 63 6c nf/doc/trunk/tcl
0060: 2e 6d 34 0a 09 68 74 74 70 3a 2f 2f 63 68 69 73 .m4..http://chis
0070: 65 6c 61 70 70 2e 63 6f 6d 2f 75 73 65 72 2f 72 elapp.com/user/r
0080: 6b 65 65 6e 65 2f 72 65 70 6f 73 69 74 6f 72 79 keene/repository
0090: 2f 61 75 74 6f 63 6f 6e 66 2f 64 6f 63 2f 74 72 /autoconf/doc/tr
00a0: 75 6e 6b 2f 73 68 6f 62 6a 2e 6d 34 0a 09 68 74 unk/shobj.m4..ht
00b0: 74 70 3a 2f 2f 63 68 69 73 65 6c 61 70 70 2e 63 tp://chiselapp.c
00c0: 6f 6d 2f 75 73 65 72 2f 72 6b 65 65 6e 65 2f 72 om/user/rkeene/r
00d0: 65 70 6f 73 69 74 6f 72 79 2f 61 75 74 6f 63 6f epository/autoco
00e0: 6e 66 2f 64 6f 63 2f 74 72 75 6e 6b 2f 76 65 72 nf/doc/trunk/ver
00f0: 73 69 6f 6e 73 63 72 69 70 74 2e 6d 34 0a 29 0a sionscript.m4.).
0100: 0a 63 64 20 22 24 28 64 69 72 6e 61 6d 65 20 22 .cd "$(dirname "
0110: 24 28 77 68 69 63 68 20 22 24 30 22 29 22 29 22 $(which "$0")")"
0120: 20 7c 7c 20 65 78 69 74 20 31 0a 0a 6d 6b 64 69 || exit 1..mkdi
0130: 72 20 61 63 6c 6f 63 61 6c 20 3e 2f 64 65 76 2f r aclocal >/dev/
0140: 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c null 2>/dev/null
0150: 0a 0a 66 69 6c 65 73 3d 28 29 0a 0a 66 6f 72 20 ..files=()..for
0160: 75 72 6c 20 69 6e 20 22 24 7b 75 72 6c 73 5b 40 url in "${urls[@
0170: 5d 7d 22 3b 20 64 6f 0a 09 66 69 6c 65 3d 22 61 ]}"; do..file="a
0180: 63 6c 6f 63 61 6c 2f 24 28 65 63 68 6f 20 22 24 clocal/$(echo "$
0190: 7b 75 72 6c 7d 22 20 7c 20 73 65 64 20 27 73 40 {url}" | sed 's@
01a0: 5e 2e 2a 2f 40 40 27 29 22 0a 0a 09 63 75 72 6c ^.*/@@')"...curl
01b0: 20 2d 6c 73 53 20 22 24 7b 75 72 6c 7d 22 20 3e -lsS "${url}" >
01c0: 20 22 24 7b 66 69 6c 65 7d 2e 6e 65 77 22 20 7c "${file}.new" |
01d0: 7c 20 65 78 69 74 20 31 0a 09 69 66 20 64 69 66 | exit 1..if dif
01e0: 66 20 22 24 7b 66 69 6c 65 7d 2e 6e 65 77 22 20 f "${file}.new"
01f0: 22 24 7b 66 69 6c 65 7d 22 20 3e 2f 64 65 76 2f "${file}" >/dev/
0200: 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c null 2>/dev/null
0210: 3b 20 74 68 65 6e 0a 09 09 72 6d 20 2d 66 20 22 ; then...rm -f "
0220: 24 7b 66 69 6c 65 7d 2e 6e 65 77 22 0a 09 65 6c ${file}.new"..el
0230: 73 65 0a 09 09 6d 76 20 22 24 7b 66 69 6c 65 7d se...mv "${file}
0240: 2e 6e 65 77 22 20 22 24 7b 66 69 6c 65 7d 22 0a .new" "${file}".
0250: 09 66 69 0a 0a 09 66 69 6c 65 73 3d 28 22 24 7b .fi...files=("${
0260: 66 69 6c 65 73 5b 40 5d 7d 22 20 22 24 7b 66 69 files[@]}" "${fi
0270: 6c 65 7d 22 29 0a 64 6f 6e 65 0a 0a 66 6f 72 20 le}").done..for
0280: 66 69 6c 65 20 69 6e 20 22 24 7b 66 69 6c 65 73 file in "${files
0290: 5b 40 5d 7d 22 3b 20 64 6f 0a 09 63 61 74 20 22 [@]}"; do..cat "
02a0: 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e 65 20 3e 20 ${file}".done >
02b0: 61 63 6c 6f 63 61 6c 2e 6d 34 2e 6e 65 77 0a 0a aclocal.m4.new..
02c0: 69 66 20 64 69 66 66 20 61 63 6c 6f 63 61 6c 2e if diff aclocal.
02d0: 6d 34 2e 6e 65 77 20 61 63 6c 6f 63 61 6c 2e 6d m4.new aclocal.m
02e0: 34 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 4 >/dev/null 2>/
02f0: 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 dev/null; then..
0300: 72 6d 20 2d 66 20 61 63 6c 6f 63 61 6c 2e 6d 34 rm -f aclocal.m4
0310: 2e 6e 65 77 0a 65 6c 73 65 0a 09 6d 76 20 61 63 .new.else..mv ac
0320: 6c 6f 63 61 6c 2e 6d 34 2e 6e 65 77 20 61 63 6c local.m4.new acl
0330: 6f 63 61 6c 2e 6d 34 0a 66 69 0a ocal.m4.fi.