Hex Artifact Content

Artifact 7cd79754ca6a9f72a4f05ac74c24a41ac3f3ee40:


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 6c 6f 63 61 6c 46 69 6c 65 73 3d 28 0a 09 61  .localFiles=(..a
0110: 63 6c 6f 63 61 6c 2f 74 63 6c 74 6c 73 5f 6f 70  clocal/tcltls_op
0120: 65 6e 73 73 6c 2e 6d 34 0a 29 0a 0a 63 64 20 22  enssl.m4.)..cd "
0130: 24 28 64 69 72 6e 61 6d 65 20 22 24 28 77 68 69  $(dirname "$(whi
0140: 63 68 20 22 24 30 22 29 22 29 22 20 7c 7c 20 65  ch "$0")")" || e
0150: 78 69 74 20 31 0a 0a 6d 6b 64 69 72 20 61 63 6c  xit 1..mkdir acl
0160: 6f 63 61 6c 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  ocal >/dev/null 
0170: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 0a 66 69 6c  2>/dev/null..fil
0180: 65 73 3d 28 29 0a 0a 66 6f 72 20 75 72 6c 20 69  es=()..for url i
0190: 6e 20 22 24 7b 75 72 6c 73 5b 40 5d 7d 22 3b 20  n "${urls[@]}"; 
01a0: 64 6f 0a 09 66 69 6c 65 3d 22 61 63 6c 6f 63 61  do..file="acloca
01b0: 6c 2f 24 28 65 63 68 6f 20 22 24 7b 75 72 6c 7d  l/$(echo "${url}
01c0: 22 20 7c 20 73 65 64 20 27 73 40 5e 2e 2a 2f 40  " | sed 's@^.*/@
01d0: 40 27 29 22 0a 0a 09 63 75 72 6c 20 2d 6c 73 53  @')"...curl -lsS
01e0: 20 22 24 7b 75 72 6c 7d 22 20 3e 20 22 24 7b 66   "${url}" > "${f
01f0: 69 6c 65 7d 2e 6e 65 77 22 20 7c 7c 20 65 78 69  ile}.new" || exi
0200: 74 20 31 0a 09 69 66 20 64 69 66 66 20 22 24 7b  t 1..if diff "${
0210: 66 69 6c 65 7d 2e 6e 65 77 22 20 22 24 7b 66 69  file}.new" "${fi
0220: 6c 65 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20  le}" >/dev/null 
0230: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65  2>/dev/null; the
0240: 6e 0a 09 09 72 6d 20 2d 66 20 22 24 7b 66 69 6c  n...rm -f "${fil
0250: 65 7d 2e 6e 65 77 22 0a 09 65 6c 73 65 0a 09 09  e}.new"..else...
0260: 6d 76 20 22 24 7b 66 69 6c 65 7d 2e 6e 65 77 22  mv "${file}.new"
0270: 20 22 24 7b 66 69 6c 65 7d 22 0a 09 66 69 0a 0a   "${file}"..fi..
0280: 09 66 69 6c 65 73 3d 28 22 24 7b 66 69 6c 65 73  .files=("${files
0290: 5b 40 5d 7d 22 20 22 24 7b 66 69 6c 65 7d 22 29  [@]}" "${file}")
02a0: 0a 64 6f 6e 65 0a 0a 66 6f 72 20 66 69 6c 65 20  .done..for file 
02b0: 69 6e 20 22 24 7b 66 69 6c 65 73 5b 40 5d 7d 22  in "${files[@]}"
02c0: 20 22 24 7b 6c 6f 63 61 6c 46 69 6c 65 73 5b 40   "${localFiles[@
02d0: 5d 7d 22 3b 20 64 6f 0a 09 63 61 74 20 22 24 7b  ]}"; do..cat "${
02e0: 66 69 6c 65 7d 22 0a 64 6f 6e 65 20 3e 20 61 63  file}".done > ac
02f0: 6c 6f 63 61 6c 2e 6d 34 2e 6e 65 77 0a 0a 69 66  local.m4.new..if
0300: 20 64 69 66 66 20 61 63 6c 6f 63 61 6c 2e 6d 34   diff aclocal.m4
0310: 2e 6e 65 77 20 61 63 6c 6f 63 61 6c 2e 6d 34 20  .new aclocal.m4 
0320: 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65  >/dev/null 2>/de
0330: 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 72 6d  v/null; then..rm
0340: 20 2d 66 20 61 63 6c 6f 63 61 6c 2e 6d 34 2e 6e   -f aclocal.m4.n
0350: 65 77 0a 65 6c 73 65 0a 09 6d 76 20 61 63 6c 6f  ew.else..mv aclo
0360: 63 61 6c 2e 6d 34 2e 6e 65 77 20 61 63 6c 6f 63  cal.m4.new acloc
0370: 61 6c 2e 6d 34 0a 66 69 0a 0a 61 75 74 6f 6d 61  al.m4.fi..automa
0380: 6b 65 20 2d 2d 61 64 64 2d 6d 69 73 73 69 6e 67  ke --add-missing
0390: 20 2d 2d 63 6f 70 79 20 2d 2d 66 6f 72 63 65 2d   --copy --force-
03a0: 6d 69 73 73 69 6e 67 20 3e 2f 64 65 76 2f 6e 75  missing >/dev/nu
03b0: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 0a  ll 2>/dev/null..
03c0: 61 75 74 6f 63 6f 6e 66 0a 0a 72 6d 20 2d 72 66  autoconf..rm -rf
03d0: 20 61 75 74 6f 6d 34 74 65 2e 63 61 63 68 65 0a   autom4te.cache.