Hex Artifact Content

Artifact ea1ed2c1f817eac121704d47875d584a27a6b59f:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 56 45  #! /bin/bash..VE
0010: 52 53 49 4f 4e 53 3d 22 38 2e 35 2e 31 35 20 38  RSIONS="8.5.15 8
0020: 2e 36 2e 31 20 63 76 73 5f 48 45 41 44 22 0a 0a  .6.1 cvs_HEAD"..
0030: 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65 20  # Find the base 
0040: 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78 20  directory.for x 
0050: 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61 69  in 1 2 3 4 __fai
0060: 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22 24  l__; do..if [ "$
0070: 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f 5f  {x}" = "__fail__
0080: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68 6f  " ]; then...echo
0090: 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64   'Unable to find
00a0: 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62 6f   KitCreator, abo
00b0: 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09 65  rting.' >&2....e
00c0: 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20 5b  xit 1..fi...if [
00d0: 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20 5d   -x kitcreator ]
00e0: 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a 09  ; then...break..
00f0: 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65 0a  fi...cd ...done.
0100: 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64 29  .ROOTDIR="$(pwd)
0110: 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f 4f  ".TESTDIR="${ROO
0120: 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73 74  TDIR}/build/test
0130: 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49 52  ".export ROOTDIR
0140: 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e 64   TESTDIR..# Hand
0150: 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 20  le command-line 
0160: 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20 22  arguments.if [ "
0170: 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d 3b  $1" = "clean" ];
0180: 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22 24   then..rm -rf "$
0190: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22 0a  {TESTDIR}/kits".
01a0: 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c 61  fi..# Create pla
01b0: 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a 6d  ce to put kits.m
01c0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
01d0: 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75 6c  /kits" >/dev/nul
01e0: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d 6b  l 2>/dev/null.mk
01f0: 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d 2f  dir "${TESTDIR}/
0200: 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f 64  kits/failed" >/d
0210: 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e  ev/null 2>/dev/n
0220: 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22 24  ull.if [ ! -d "$
0230: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22 20  {TESTDIR}/kits" 
0240: 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27 55  ]; then..echo 'U
0250: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
0260: 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79 2c  kits/ directory,
0270: 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a   aborting.' >&2.
0280: 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20 43  ..exit 1.fi..# C
0290: 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65 20  leanup.for file 
02a0: 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22 2f  in "${TESTDIR}"/
02b0: 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a 09  kits/*.log; do..
02c0: 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65 7d  if echo "${file}
02d0: 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62 75  " | grep -- '-bu
02e0: 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76 2f  ild.log$' >/dev/
02f0: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f 6e  null; then...con
0300: 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20 2d  tinue..fi...rm -
0310: 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e 65  f "${file}".done
0320: 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e 45  ..# Disable WINE
0330: 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45 50   debugging.WINEP
0340: 52 45 46 49 58 33 32 3d 22 24 7b 54 45 53 54 44  REFIX32="${TESTD
0350: 49 52 7d 2f 2e 77 69 6e 65 22 0a 57 49 4e 45 50  IR}/.wine".WINEP
0360: 52 45 46 49 58 36 34 3d 22 24 7b 54 45 53 54 44  REFIX64="${TESTD
0370: 49 52 7d 2f 2e 77 69 6e 65 36 34 22 0a 65 78 70  IR}/.wine64".exp
0380: 6f 72 74 20 57 49 4e 45 50 52 45 46 49 58 33 32  ort WINEPREFIX32
0390: 20 57 49 4e 45 50 52 45 46 49 58 36 34 0a 72 6d   WINEPREFIX64.rm
03a0: 20 2d 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46   -rf "${WINEPREF
03b0: 49 58 33 32 7d 22 20 22 24 7b 57 49 4e 45 50 52  IX32}" "${WINEPR
03c0: 45 46 49 58 36 34 7d 22 0a 6d 6b 64 69 72 20 22  EFIX64}".mkdir "
03d0: 24 7b 57 49 4e 45 50 52 45 46 49 58 33 32 7d 22  ${WINEPREFIX32}"
03e0: 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58 36 34   "${WINEPREFIX64
03f0: 7d 22 0a 0a 63 61 74 20 3c 3c 20 5c 5f 45 4f 46  }"..cat << \_EOF
0400: 5f 20 3e 20 22 24 7b 57 49 4e 45 50 52 45 46 49  _ > "${WINEPREFI
0410: 58 33 32 7d 2f 75 70 64 61 74 65 2d 72 65 67 22  X32}/update-reg"
0420: 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c 5f 4d 41 43  .[HKEY_LOCAL_MAC
0430: 48 49 4e 45 5c 53 6f 66 74 77 61 72 65 5c 4d 69  HINE\Software\Mi
0440: 63 72 6f 73 6f 66 74 5c 57 69 6e 64 6f 77 73 20  crosoft\Windows 
0450: 4e 54 5c 43 75 72 72 65 6e 74 56 65 72 73 69 6f  NT\CurrentVersio
0460: 6e 5c 41 65 44 65 62 75 67 5d 0a 22 41 75 74 6f  n\AeDebug]."Auto
0470: 22 3d 64 77 6f 72 64 3a 30 30 30 30 30 30 30 31  "=dword:00000001
0480: 0a 22 44 65 62 75 67 67 65 72 22 3d 22 66 61 6c  ."Debugger"="fal
0490: 73 65 22 0a 5f 45 4f 46 5f 0a 63 70 20 22 24 7b  se"._EOF_.cp "${
04a0: 57 49 4e 45 50 52 45 46 49 58 33 32 7d 2f 75 70  WINEPREFIX32}/up
04b0: 64 61 74 65 2d 72 65 67 22 20 22 24 7b 57 49 4e  date-reg" "${WIN
04c0: 45 50 52 45 46 49 58 36 34 7d 2f 75 70 64 61 74  EPREFIX64}/updat
04d0: 65 2d 72 65 67 22 0a 0a 57 49 4e 45 50 52 45 46  e-reg"..WINEPREF
04e0: 49 58 3d 22 24 7b 57 49 4e 45 50 52 45 46 49 58  IX="${WINEPREFIX
04f0: 33 32 7d 22 20 72 65 67 65 64 69 74 20 22 24 7b  32}" regedit "${
0500: 57 49 4e 45 50 52 45 46 49 58 33 32 7d 2f 75 70  WINEPREFIX32}/up
0510: 64 61 74 65 2d 72 65 67 22 20 3e 2f 64 65 76 2f  date-reg" >/dev/
0520: 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c  null 2>/dev/null
0530: 0a 57 49 4e 45 50 52 45 46 49 58 3d 22 24 7b 57  .WINEPREFIX="${W
0540: 49 4e 45 50 52 45 46 49 58 36 34 7d 22 20 72 65  INEPREFIX64}" re
0550: 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52 45  gedit "${WINEPRE
0560: 46 49 58 36 34 7d 2f 75 70 64 61 74 65 2d 72 65  FIX64}/update-re
0570: 67 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  g" >/dev/null 2>
0580: 2f 64 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61  /dev/null..# Sta
0590: 72 74 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d  rt Xvfb for X11-
05a0: 62 61 73 65 64 20 74 65 73 74 73 0a 58 56 46 42  based tests.XVFB
05b0: 5f 50 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a  _PID="$(..Xvfb :
05c0: 33 31 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30  31 -screen 0 800
05d0: 78 36 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65  x600x24 -noliste
05e0: 6e 20 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c  n tcp >/dev/null
05f0: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09   2>/dev/null &..
0600: 65 63 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53  echo "$!".)".DIS
0610: 50 4c 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20  PLAY=:31.export 
0620: 44 49 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24  DISPLAY..if [ "$
0630: 7b 42 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31  {BIGBUILD}" = "1
0640: 22 20 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d  " ]; then..kits=
0650: 22 24 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c  "$(echo normal{,
0660: 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74  -zip,-nomk4}{,-t
0670: 68 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69  hreaded}{,-stati
0680: 63 74 6b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d 61  ctk,-notk} norma
0690: 6c 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d  l{,-threaded}{,-
06a0: 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c  notk}{,-nomk4}{,
06b0: 2d 64 65 62 75 67 7d 2d 6b 69 74 64 6c 6c 20 77  -debug}-kitdll w
06c0: 69 6e 33 32 2d 69 35 38 36 7b 2c 2d 7a 69 70 2c  in32-i586{,-zip,
06d0: 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64  -nomk4}{,-thread
06e0: 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 20 77 69 6e 33  ed}{,-notk} win3
06f0: 32 2d 69 35 38 36 7b 2c 2d 74 68 72 65 61 64 65  2-i586{,-threade
0700: 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d  d}{,-notk}{,-nom
0710: 6b 34 7d 2d 6b 69 74 64 6c 6c 20 6d 69 6e 7b 2c  k4}-kitdll min{,
0720: 2d 73 74 61 74 69 63 7d 20 7b 6c 69 6e 75 78 2d  -static} {linux-
0730: 6d 69 70 73 65 6c 2d 6d 69 6e 7d 7b 2c 2d 64 65  mipsel-min}{,-de
0740: 62 75 67 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b  bug}{,-kitdll} {
0750: 6c 69 6e 75 78 2d 69 33 38 36 2c 73 6f 6c 61 72  linux-i386,solar
0760: 69 73 2d 69 33 38 36 2c 73 6f 6c 61 72 69 73 2d  is-i386,solaris-
0770: 61 6d 64 36 34 2c 73 6f 6c 61 72 69 73 2d 73 70  amd64,solaris-sp
0780: 61 72 63 2c 73 6f 6c 61 72 69 73 2d 73 70 61 72  arc,solaris-spar
0790: 63 36 34 2c 66 72 65 65 62 73 64 2d 61 6d 64 36  c64,freebsd-amd6
07a0: 34 2c 6e 65 74 62 73 64 2d 61 6d 64 36 34 7d 7b  4,netbsd-amd64}{
07b0: 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d  ,-zip,-nomk4}{,-
07c0: 74 68 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74  threaded}{,-stat
07d0: 69 63 74 6b 2c 2d 6e 6f 74 6b 7d 7b 2c 64 65 62  ictk,-notk}{,deb
07e0: 75 67 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38  ug} {solaris-i38
07f0: 36 2c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c  6,solaris-amd64,
0800: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f  solaris-sparc,so
0810: 6c 61 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72  laris-sparc64,fr
0820: 65 65 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62  eebsd-amd64,netb
0830: 73 64 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65  sd-amd64}{,-thre
0840: 61 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d  aded}{,-notk}{,-
0850: 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67 7d 2d 6b  nomk4}{,debug}-k
0860: 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 69 33 38  itdll netbsd-i38
0870: 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b  6{,-zip,-nomk4}{
0880: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 64 65 62  ,-threaded}{,deb
0890: 75 67 7d 2d 6e 6f 74 6b 20 6e 65 74 62 73 64 2d  ug}-notk netbsd-
08a0: 69 33 38 36 7b 2c 2d 74 68 72 65 61 64 65 64 7d  i386{,-threaded}
08b0: 7b 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 64 65 62 75 67  {,-nomk4}{,debug
08c0: 7d 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 61 6e  }-notk-kitdll an
08d0: 64 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 7b 2c  droid-arm-notk{,
08e0: 2d 64 65 62 75 67 7d 20 61 6e 64 6f 69 64 2d 61  -debug} andoid-a
08f0: 72 6d 2d 6e 6f 74 6b 7b 2c 2d 64 65 62 75 67 7d  rm-notk{,-debug}
0900: 2d 6b 69 74 64 6c 6c 29 22 0a 65 6c 73 65 0a 09  -kitdll)".else..
0910: 6b 69 74 73 3d 22 6e 6f 72 6d 61 6c 20 6e 6f 72  kits="normal nor
0920: 6d 61 6c 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 74  mal-zip normal-t
0930: 68 72 65 61 64 65 64 20 6e 6f 72 6d 61 6c 2d 74  hreaded normal-t
0940: 68 72 65 61 64 65 64 2d 7a 69 70 20 6e 6f 72 6d  hreaded-zip norm
0950: 61 6c 2d 73 74 61 74 69 63 74 6b 20 6e 6f 72 6d  al-statictk norm
0960: 61 6c 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74  al-notk normal-t
0970: 68 72 65 61 64 65 64 2d 6e 6f 74 6b 20 6e 6f 72  hreaded-notk nor
0980: 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 7a 69 70  mal-threaded-zip
0990: 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d  -notk normal-nom
09a0: 6b 34 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 20  k4 normal-debug 
09b0: 6d 69 6e 20 6d 69 6e 2d 73 74 61 74 69 63 20 6e  min min-static n
09c0: 6f 72 6d 61 6c 2d 6b 69 74 64 6c 6c 20 6e 6f 72  ormal-kitdll nor
09d0: 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6b 69 74  mal-threaded-kit
09e0: 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d  dll normal-notk-
09f0: 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f  kitdll normal-no
0a00: 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61  mk4-kitdll norma
0a10: 6c 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74  l-nomk4-notk-kit
0a20: 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61  dll normal-threa
0a30: 64 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c  ded-nomk4-kitdll
0a40: 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64   normal-threaded
0a50: 2d 6e 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64  -notk-nomk4-kitd
0a60: 6c 6c 20 6e 6f 72 6d 61 6c 2d 64 65 62 75 67 2d  ll normal-debug-
0a70: 6b 69 74 64 6c 6c 20 6d 69 6e 2d 6b 69 74 64 6c  kitdll min-kitdl
0a80: 6c 20 77 69 6e 33 32 2d 69 35 38 36 20 77 69 6e  l win32-i586 win
0a90: 33 32 2d 69 35 38 36 2d 7a 69 70 20 77 69 6e 33  32-i586-zip win3
0aa0: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 20  2-i586-threaded 
0ab0: 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61  win32-i586-threa
0ac0: 64 65 64 2d 7a 69 70 20 77 69 6e 33 32 2d 69 35  ded-zip win32-i5
0ad0: 38 36 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69 35  86-notk win32-i5
0ae0: 38 36 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74 6b  86-threaded-notk
0af0: 20 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b   win32-i586-nomk
0b00: 34 20 77 69 6e 33 32 2d 69 35 38 36 2d 6b 69 74  4 win32-i586-kit
0b10: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  dll win32-i586-t
0b20: 68 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20 77  hreaded-kitdll w
0b30: 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 2d 6b  in32-i586-notk-k
0b40: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
0b50: 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69  -nomk4-kitdll wi
0b60: 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6e  n32-i586-nomk4-n
0b70: 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32  otk-kitdll win32
0b80: 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d 6e  -i586-threaded-n
0b90: 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  omk4-kitdll win3
0ba0: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d  2-i586-threaded-
0bb0: 6e 6f 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c  notk-nomk4-kitdl
0bc0: 6c 20 77 69 6e 36 34 2d 61 6d 64 36 34 20 77 69  l win64-amd64 wi
0bd0: 6e 36 34 2d 61 6d 64 36 34 2d 7a 69 70 20 77 69  n64-amd64-zip wi
0be0: 6e 36 34 2d 61 6d 64 36 34 2d 74 68 72 65 61 64  n64-amd64-thread
0bf0: 65 64 20 77 69 6e 36 34 2d 61 6d 64 36 34 2d 74  ed win64-amd64-t
0c00: 68 72 65 61 64 65 64 2d 7a 69 70 20 77 69 6e 36  hreaded-zip win6
0c10: 34 2d 61 6d 64 36 34 2d 6e 6f 74 6b 20 77 69 6e  4-amd64-notk win
0c20: 36 34 2d 61 6d 64 36 34 2d 74 68 72 65 61 64 65  64-amd64-threade
0c30: 64 2d 6e 6f 74 6b 20 77 69 6e 36 34 2d 61 6d 64  d-notk win64-amd
0c40: 36 34 2d 6e 6f 6d 6b 34 20 77 69 6e 36 34 2d 61  64-nomk4 win64-a
0c50: 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 36  md64-kitdll win6
0c60: 34 2d 61 6d 64 36 34 2d 74 68 72 65 61 64 65 64  4-amd64-threaded
0c70: 2d 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d  -kitdll win64-am
0c80: 64 36 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20  d64-notk-kitdll 
0c90: 77 69 6e 36 34 2d 61 6d 64 36 34 2d 6e 6f 6d 6b  win64-amd64-nomk
0ca0: 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61  4-kitdll win64-a
0cb0: 6d 64 36 34 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d  md64-nomk4-notk-
0cc0: 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61 6d 64  kitdll win64-amd
0cd0: 36 34 2d 74 68 72 65 61 64 65 64 2d 6e 6f 6d 6b  64-threaded-nomk
0ce0: 34 2d 6b 69 74 64 6c 6c 20 77 69 6e 36 34 2d 61  4-kitdll win64-a
0cf0: 6d 64 36 34 2d 74 68 72 65 61 64 65 64 2d 6e 6f  md64-threaded-no
0d00: 74 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20  tk-nomk4-kitdll 
0d10: 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e 6f 74  linux-mipsel-not
0d20: 6b 20 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6e  k linux-mipsel-n
0d30: 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78  otk-kitdll linux
0d40: 2d 69 33 38 36 20 6c 69 6e 75 78 2d 69 33 38 36  -i386 linux-i386
0d50: 2d 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38  -debug linux-i38
0d60: 36 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d 69  6-kitdll linux-i
0d70: 33 38 36 2d 64 65 62 75 67 2d 6b 69 74 64 6c 6c  386-debug-kitdll
0d80: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b   linux-i386-notk
0d90: 20 6c 69 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b   linux-i386-notk
0da0: 2d 64 65 62 75 67 20 6c 69 6e 75 78 2d 69 33 38  -debug linux-i38
0db0: 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 6c 69  6-notk-kitdll li
0dc0: 6e 75 78 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65  nux-i386-notk-de
0dd0: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0de0: 69 73 2d 69 33 38 36 20 73 6f 6c 61 72 69 73 2d  is-i386 solaris-
0df0: 69 33 38 36 2d 64 65 62 75 67 20 73 6f 6c 61 72  i386-debug solar
0e00: 69 73 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73  is-i386-kitdll s
0e10: 6f 6c 61 72 69 73 2d 69 33 38 36 2d 64 65 62 75  olaris-i386-debu
0e20: 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69 73  g-kitdll solaris
0e30: 2d 61 6d 64 36 34 20 73 6f 6c 61 72 69 73 2d 61  -amd64 solaris-a
0e40: 6d 64 36 34 2d 64 65 62 75 67 20 73 6f 6c 61 72  md64-debug solar
0e50: 69 73 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20  is-amd64-kitdll 
0e60: 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2d 64 65  solaris-amd64-de
0e70: 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72  bug-kitdll solar
0e80: 69 73 2d 73 70 61 72 63 20 73 6f 6c 61 72 69 73  is-sparc solaris
0e90: 2d 73 70 61 72 63 2d 64 65 62 75 67 20 73 6f 6c  -sparc-debug sol
0ea0: 61 72 69 73 2d 73 70 61 72 63 2d 6b 69 74 64 6c  aris-sparc-kitdl
0eb0: 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d  l solaris-sparc-
0ec0: 64 65 62 75 67 2d 6b 69 74 64 6c 6c 20 73 6f 6c  debug-kitdll sol
0ed0: 61 72 69 73 2d 73 70 61 72 63 36 34 20 73 6f 6c  aris-sparc64 sol
0ee0: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 64 65 62  aris-sparc64-deb
0ef0: 75 67 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ug solaris-sparc
0f00: 36 34 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61 72 69  64-kitdll solari
0f10: 73 2d 73 70 61 72 63 36 34 2d 64 65 62 75 67 2d  s-sparc64-debug-
0f20: 6b 69 74 64 6c 6c 20 66 72 65 65 62 73 64 2d 61  kitdll freebsd-a
0f30: 6d 64 36 34 20 66 72 65 65 62 73 64 2d 61 6d 64  md64 freebsd-amd
0f40: 36 34 2d 64 65 62 75 67 20 66 72 65 65 62 73 64  64-debug freebsd
0f50: 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 66 72  -amd64-kitdll fr
0f60: 65 65 62 73 64 2d 61 6d 64 36 34 2d 64 65 62 75  eebsd-amd64-debu
0f70: 67 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  g-kitdll netbsd-
0f80: 69 33 38 36 2d 6e 6f 74 6b 20 6e 65 74 62 73 64  i386-notk netbsd
0f90: 2d 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67  -i386-notk-debug
0fa0: 20 6e 65 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74   netbsd-i386-not
0fb0: 6b 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d  k-kitdll netbsd-
0fc0: 69 33 38 36 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d  i386-notk-debug-
0fd0: 6b 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d  kitdll netbsd-am
0fe0: 64 36 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34  d64 netbsd-amd64
0ff0: 2d 64 65 62 75 67 20 6e 65 74 62 73 64 2d 61 6d  -debug netbsd-am
1000: 64 36 34 2d 6b 69 74 64 6c 6c 20 6e 65 74 62 73  d64-kitdll netbs
1010: 64 2d 61 6d 64 36 34 2d 64 65 62 75 67 2d 6b 69  d-amd64-debug-ki
1020: 74 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d  tdll android-arm
1030: 2d 6e 6f 74 6b 20 61 6e 64 72 6f 69 64 2d 61 72  -notk android-ar
1040: 6d 2d 6e 6f 74 6b 2d 64 65 62 75 67 20 61 6e 64  m-notk-debug and
1050: 72 6f 69 64 2d 61 72 6d 2d 6e 6f 74 6b 2d 6b 69  roid-arm-notk-ki
1060: 74 64 6c 6c 20 61 6e 64 72 6f 69 64 2d 61 72 6d  tdll android-arm
1070: 2d 6e 6f 74 6b 2d 64 65 62 75 67 2d 6b 69 74 64  -notk-debug-kitd
1080: 6c 6c 22 0a 66 69 0a 0a 66 61 69 6c 65 64 3d 22  ll".fi..failed="
1090: 22 0a 66 6f 72 20 6b 69 74 20 69 6e 20 24 6b 69  ".for kit in $ki
10a0: 74 73 3b 20 64 6f 0a 09 6b 69 74 63 72 65 61 74  ts; do..kitcreat
10b0: 6f 72 3d 22 2e 2f 6b 69 74 63 72 65 61 74 6f 72  or="./kitcreator
10c0: 22 0a 09 61 72 67 73 3d 22 22 0a 09 72 75 6e 6e  "..args=""..runn
10d0: 61 62 6c 65 3d 22 31 22 0a 09 69 73 7a 69 70 3d  able="1"..iszip=
10e0: 22 30 22 0a 09 73 74 61 74 69 63 74 6b 3d 22 30  "0"..statictk="0
10f0: 22 0a 09 6e 6f 74 6b 3d 22 30 22 0a 09 6e 6f 6d  "..notk="0"..nom
1100: 6b 34 3d 22 30 22 0a 09 78 63 6f 6d 70 69 6c 65  k4="0"..xcompile
1110: 3d 22 30 22 0a 09 6b 69 74 64 6c 6c 3d 22 30 22  ="0"..kitdll="0"
1120: 0a 09 6b 69 74 72 75 6e 63 6d 64 3d 22 22 0a 0a  ..kitruncmd=""..
1130: 09 23 20 48 61 6e 64 6c 65 20 62 61 73 65 20 63  .# Handle base c
1140: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 09 6f 73  onfiguration..os
1150: 3d 22 24 28 75 6e 61 6d 65 20 2d 73 20 7c 20 64  ="$(uname -s | d
1160: 64 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f  d conv=lcase 2>/
1170: 64 65 76 2f 6e 75 6c 6c 29 22 0a 09 63 70 75 3d  dev/null)"..cpu=
1180: 22 24 28 75 6e 61 6d 65 20 2d 6d 20 7c 20 64 64  "$(uname -m | dd
1190: 20 63 6f 6e 76 3d 6c 63 61 73 65 20 32 3e 2f 64   conv=lcase 2>/d
11a0: 65 76 2f 6e 75 6c 6c 20 7c 20 73 65 64 20 27 73  ev/null | sed 's
11b0: 40 78 38 36 5f 36 34 40 61 6d 64 36 34 40 3b 73  @x86_64@amd64@;s
11c0: 40 69 2e 38 36 40 69 33 38 36 40 27 29 22 0a 09  @i.86@i386@')"..
11d0: 63 61 73 65 20 22 24 7b 6b 69 74 7d 22 20 69 6e  case "${kit}" in
11e0: 0a 09 09 6e 6f 72 6d 61 6c 7c 6e 6f 72 6d 61 6c  ...normal|normal
11f0: 2d 2a 29 0a 09 09 09 6b 69 74 3d 22 24 28 65 63  -*)....kit="$(ec
1200: 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65  ho "${kit}" | se
1210: 64 20 22 73 40 5e 6e 6f 72 6d 61 6c 40 24 6f 73  d "s@^normal@$os
1220: 2d 24 63 70 75 40 22 29 22 0a 09 09 09 3b 3b 0a  -$cpu@")"....;;.
1230: 09 09 6d 69 6e 7c 6d 69 6e 2d 6b 69 74 64 6c 6c  ..min|min-kitdll
1240: 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d  )....kitcreator=
1250: 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69  "./build/make-mi
1260: 6e 6b 69 74 22 0a 09 09 09 69 73 7a 69 70 3d 22  nkit"....iszip="
1270: 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09  1"....notk="1"..
1280: 09 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24  ..kit="$(echo "$
1290: 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40  {kit}" | sed "s@
12a0: 5e 6d 69 6e 40 24 6f 73 2d 24 63 70 75 2d 6d 69  ^min@$os-$cpu-mi
12b0: 6e 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69  n@")"....;;...mi
12c0: 6e 2d 73 74 61 74 69 63 29 0a 09 09 09 6b 69 74  n-static)....kit
12d0: 63 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64  creator="./build
12e0: 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 2d 73 74 61  /make-minkit-sta
12f0: 74 69 63 22 0a 09 09 09 69 73 7a 69 70 3d 22 31  tic"....iszip="1
1300: 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09  "....notk="1"...
1310: 09 6b 69 74 3d 22 24 7b 6f 73 7d 2d 24 7b 63 70  .kit="${os}-${cp
1320: 75 7d 2d 6d 69 6e 2d 73 74 61 74 69 63 22 0a 09  u}-min-static"..
1330: 09 09 3b 3b 0a 09 09 77 69 6e 33 32 7c 77 69 6e  ..;;...win32|win
1340: 33 32 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61  32-*)....kitcrea
1350: 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b  tor="./build/mak
1360: 65 2d 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09  e-kit-win32"....
1370: 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09  xcompile="1"....
1380: 72 75 6e 6e 61 62 6c 65 3d 22 31 22 0a 09 09 09  runnable="1"....
1390: 6b 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22  kitruncmd="wine"
13a0: 0a 09 09 09 3b 3b 0a 09 09 77 69 6e 36 34 7c 77  ....;;...win64|w
13b0: 69 6e 36 34 2d 2a 29 0a 09 09 09 6b 69 74 63 72  in64-*)....kitcr
13c0: 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d  eator="./build/m
13d0: 61 6b 65 2d 6b 69 74 2d 77 69 6e 36 34 22 0a 09  ake-kit-win64"..
13e0: 09 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09  ..xcompile="1"..
13f0: 09 09 72 75 6e 6e 61 62 6c 65 3d 22 31 22 0a 09  ..runnable="1"..
1400: 09 09 6b 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e  ..kitruncmd="win
1410: 65 36 34 22 0a 09 09 09 3b 3b 0a 09 09 6c 69 6e  e64"....;;...lin
1420: 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 7c 6c 69  ux-mipsel-min|li
1430: 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b  nux-mipsel-min-k
1440: 69 74 64 6c 6c 29 0a 09 09 09 6b 69 74 63 72 65  itdll)....kitcre
1450: 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61  ator="./build/ma
1460: 6b 65 2d 6b 69 74 2d 6c 69 6e 75 78 2d 6d 69 70  ke-kit-linux-mip
1470: 73 65 6c 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65  sel"....runnable
1480: 3d 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65  ="0"....xcompile
1490: 3d 22 31 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22  ="1"....notk="1"
14a0: 0a 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09  ....iszip="1"...
14b0: 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 69 33 38 36  .;;...linux-i386
14c0: 7c 6c 69 6e 75 78 2d 69 33 38 36 2d 2a 29 0a 09  |linux-i386-*)..
14d0: 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22 2e 2f  ..kitcreator="./
14e0: 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74 2d 6c  build/make-kit-l
14f0: 69 6e 75 78 2d 69 33 38 36 22 0a 09 09 09 78 63  inux-i386"....xc
1500: 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 72 75  ompile="1"....ru
1510: 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09 09 3b 3b  nnable="0"....;;
1520: 0a 09 09 61 6e 64 72 6f 69 64 2d 61 72 6d 7c 61  ...android-arm|a
1530: 6e 64 72 6f 69 64 2d 61 72 6d 2d 2a 7c 5c 0a 09  ndroid-arm-*|\..
1540: 09 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 7c 6c 69  .linux-mipsel|li
1550: 6e 75 78 2d 6d 69 70 73 65 6c 2d 2a 7c 5c 0a 09  nux-mipsel-*|\..
1560: 09 6c 69 6e 75 78 2d 61 6d 64 36 34 7c 6c 69 6e  .linux-amd64|lin
1570: 75 78 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73  ux-amd64-*|\...s
1580: 6f 6c 61 72 69 73 2d 69 33 38 36 7c 73 6f 6c 61  olaris-i386|sola
1590: 72 69 73 2d 69 33 38 36 2d 2a 7c 5c 0a 09 09 73  ris-i386-*|\...s
15a0: 6f 6c 61 72 69 73 2d 61 6d 64 36 34 7c 73 6f 6c  olaris-amd64|sol
15b0: 61 72 69 73 2d 61 6d 64 36 34 2d 2a 7c 5c 0a 09  aris-amd64-*|\..
15c0: 09 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 7c 73  .solaris-sparc|s
15d0: 6f 6c 61 72 69 73 2d 73 70 61 72 63 2d 2a 7c 5c  olaris-sparc-*|\
15e0: 0a 09 09 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ...solaris-sparc
15f0: 36 34 7c 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  64|solaris-sparc
1600: 36 34 2d 2a 7c 5c 0a 09 09 66 72 65 65 62 73 64  64-*|\...freebsd
1610: 2d 61 6d 64 36 34 7c 66 72 65 65 62 73 64 2d 61  -amd64|freebsd-a
1620: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73  md64-*|\...netbs
1630: 64 2d 69 33 38 36 7c 6e 65 74 62 73 64 2d 69 33  d-i386|netbsd-i3
1640: 38 36 2d 2a 7c 5c 0a 09 09 6e 65 74 62 73 64 2d  86-*|\...netbsd-
1650: 61 6d 64 36 34 7c 6e 65 74 62 73 64 2d 61 6d 64  amd64|netbsd-amd
1660: 36 34 2d 2a 7c 5c 0a 09 09 68 70 75 78 2d 68 70  64-*|\...hpux-hp
1670: 70 61 36 34 7c 68 70 75 78 2d 68 70 70 61 36 34  pa64|hpux-hppa64
1680: 2d 2a 29 0a 09 09 09 70 6c 61 74 66 6f 72 6d 3d  -*)....platform=
1690: 22 24 28 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22  "$(echo "${kit}"
16a0: 20 7c 20 63 75 74 20 2d 66 20 31 2d 32 20 2d 64   | cut -f 1-2 -d
16b0: 20 27 2d 27 29 22 0a 09 09 09 6b 69 74 63 72 65   '-')"....kitcre
16c0: 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61  ator="./build/ma
16d0: 6b 65 2d 6b 69 74 2d 24 7b 70 6c 61 74 66 6f 72  ke-kit-${platfor
16e0: 6d 7d 22 0a 09 09 09 72 75 6e 6e 61 62 6c 65 3d  m}"....runnable=
16f0: 22 30 22 0a 09 09 09 78 63 6f 6d 70 69 6c 65 3d  "0"....xcompile=
1700: 22 31 22 0a 09 09 09 69 73 7a 69 70 3d 22 30 22  "1"....iszip="0"
1710: 0a 0a 09 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09  .....;;..esac...
1720: 69 66 20 65 63 68 6f 20 22 24 7b 6b 69 74 7d 22  if echo "${kit}"
1730: 20 7c 20 65 67 72 65 70 20 2d 2d 20 27 2d 28 68   | egrep -- '-(h
1740: 70 70 61 36 34 7c 61 6d 64 36 34 7c 73 70 61 72  ppa64|amd64|spar
1750: 63 36 34 29 28 2d 7c 24 29 27 20 3e 2f 64 65 76  c64)(-|$)' >/dev
1760: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 61 72  /null; then...ar
1770: 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d 2d 65 6e  gs="${args} --en
1780: 61 62 6c 65 2d 36 34 62 69 74 22 0a 09 66 69 0a  able-64bit"..fi.
1790: 0a 09 63 61 73 65 20 22 24 7b 6b 69 74 72 75 6e  ..case "${kitrun
17a0: 63 6d 64 7d 22 20 69 6e 0a 09 09 77 69 6e 65 29  cmd}" in...wine)
17b0: 0a 09 09 09 57 49 4e 45 50 52 45 46 49 58 3d 22  ....WINEPREFIX="
17c0: 24 7b 57 49 4e 45 50 52 45 46 49 58 33 32 7d 22  ${WINEPREFIX32}"
17d0: 0a 09 09 09 65 78 70 6f 72 74 20 57 49 4e 45 50  ....export WINEP
17e0: 52 45 46 49 58 0a 09 09 09 3b 3b 0a 09 09 77 69  REFIX....;;...wi
17f0: 6e 65 36 34 29 0a 09 09 09 57 49 4e 45 50 52 45  ne64)....WINEPRE
1800: 46 49 58 3d 22 24 7b 57 49 4e 45 50 52 45 46 49  FIX="${WINEPREFI
1810: 58 36 34 7d 22 0a 09 09 09 65 78 70 6f 72 74 20  X64}"....export 
1820: 57 49 4e 45 50 52 45 46 49 58 0a 09 09 09 3b 3b  WINEPREFIX....;;
1830: 0a 09 65 73 61 63 0a 0a 09 69 66 20 5b 20 22 24  ..esac...if [ "$
1840: 7b 78 63 6f 6d 70 69 6c 65 7d 22 20 21 3d 20 22  {xcompile}" != "
1850: 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 6b 69 74  0" ]; then...kit
1860: 3d 22 24 7b 6b 69 74 7d 2d 78 63 6f 6d 70 69 6c  ="${kit}-xcompil
1870: 65 22 0a 09 66 69 0a 0a 09 23 20 48 61 6e 64 6c  e"..fi...# Handl
1880: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e  e additional con
1890: 66 69 67 75 72 61 74 69 6f 6e 0a 09 74 65 6d 70  figuration..temp
18a0: 6b 69 74 3d 22 2d 24 7b 6b 69 74 7d 2d 22 0a 09  kit="-${kit}-"..
18b0: 66 6f 72 20 74 72 79 20 69 6e 20 31 20 32 20 33  for try in 1 2 3
18c0: 20 34 20 35 20 36 20 37 20 38 20 39 3b 20 64 6f   4 5 6 7 8 9; do
18d0: 0a 09 09 63 61 73 65 20 22 2d 24 7b 74 65 6d 70  ...case "-${temp
18e0: 6b 69 74 7d 2d 22 20 69 6e 0a 09 09 09 2a 2d 74  kit}-" in....*-t
18f0: 68 72 65 61 64 65 64 2d 2a 29 0a 09 09 09 09 74  hreaded-*).....t
1900: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
1910: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
1920: 64 20 27 73 40 2d 74 68 72 65 61 64 65 64 2d 40  d 's@-threaded-@
1930: 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d 22  -@')".....args="
1940: 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65  ${args} --enable
1950: 2d 74 68 72 65 61 64 73 22 0a 09 09 09 09 3b 3b  -threads".....;;
1960: 0a 09 09 09 2a 2d 7a 69 70 2d 2a 29 0a 09 09 09  ....*-zip-*)....
1970: 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f  .tempkit="$(echo
1980: 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20   "${tempkit}" | 
1990: 73 65 64 20 27 73 40 2d 7a 69 70 2d 40 2d 40 27  sed 's@-zip-@-@'
19a0: 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61  )".....args="${a
19b0: 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69  rgs} --enable-ki
19c0: 74 2d 73 74 6f 72 61 67 65 3d 7a 69 70 22 0a 09  t-storage=zip"..
19d0: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
19e0: 09 3b 3b 0a 09 09 09 2a 2d 73 74 61 74 69 63 74  .;;....*-statict
19f0: 6b 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  k-*).....tempkit
1a00: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
1a10: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
1a20: 73 74 61 74 69 63 74 6b 2d 40 2d 40 27 29 22 0a  statictk-@-@')".
1a30: 09 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b  ....if [ "${notk
1a40: 7d 22 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  }" = "0" ]; then
1a50: 0a 09 09 09 09 09 73 74 61 74 69 63 74 6b 3d 22  ......statictk="
1a60: 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09  1".....else.....
1a70: 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a 20 55  .echo "${kit}: U
1a80: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
1a90: 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e 6f 54  StaticTk and NoT
1aa0: 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 53 74 61 74  k, ignoring Stat
1ab0: 69 63 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69  icTk" >&2.....fi
1ac0: 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 74  .....;;....*-not
1ad0: 6b 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  k-*).....tempkit
1ae0: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
1af0: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
1b00: 6e 6f 74 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09  notk-@-@')".....
1b10: 69 66 20 5b 20 22 24 7b 73 74 61 74 69 63 74 6b  if [ "${statictk
1b20: 7d 22 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  }" = "0" ]; then
1b30: 0a 09 09 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09  ......notk="1"..
1b40: 09 09 09 65 6c 73 65 0a 09 09 09 09 09 65 63 68  ...else......ech
1b50: 6f 20 22 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c  o "${kit}: Unabl
1b60: 65 20 74 6f 20 63 72 65 61 74 65 20 53 74 61 74  e to create Stat
1b70: 69 63 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69  icTk and NoTk, i
1b80: 67 6e 6f 72 69 6e 67 20 4e 6f 54 6b 22 20 3e 26  gnoring NoTk" >&
1b90: 32 0a 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a  2.....fi.....;;.
1ba0: 09 09 09 2a 2d 6e 6f 6d 6b 34 2d 2a 29 0a 09 09  ...*-nomk4-*)...
1bb0: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
1bc0: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1bd0: 20 73 65 64 20 27 73 40 2d 6e 6f 6d 6b 34 2d 40   sed 's@-nomk4-@
1be0: 2d 40 27 29 22 0a 09 09 09 09 6e 6f 6d 6b 34 3d  -@')".....nomk4=
1bf0: 22 31 22 0a 09 09 09 09 69 73 7a 69 70 3d 22 31  "1".....iszip="1
1c00: 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6b 69  ".....;;....*-ki
1c10: 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 74 65 6d 70  tdll-*).....temp
1c20: 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b 74  kit="$(echo "${t
1c30: 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65 64 20 27  empkit}" | sed '
1c40: 73 40 2d 6b 69 74 64 6c 6c 2d 40 2d 40 27 29 22  s@-kitdll-@-@')"
1c50: 0a 09 09 09 09 6b 69 74 64 6c 6c 3d 22 31 22 0a  .....kitdll="1".
1c60: 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 64 65 62 75  ....;;....*-debu
1c70: 67 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  g-*).....tempkit
1c80: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
1c90: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
1ca0: 64 65 62 75 67 2d 40 2d 40 27 29 22 0a 09 09 09  debug-@-@')"....
1cb0: 09 61 72 67 73 3d 22 24 7b 61 72 67 73 7d 20 2d  .args="${args} -
1cc0: 2d 65 6e 61 62 6c 65 2d 73 79 6d 62 6f 6c 73 22  -enable-symbols"
1cd0: 0a 09 09 09 09 3b 3b 0a 09 09 65 73 61 63 0a 09  .....;;...esac..
1ce0: 64 6f 6e 65 0a 0a 09 69 66 20 5b 20 22 24 7b 6b  done...if [ "${k
1cf0: 69 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b  itdll}" = "1" ];
1d00: 20 74 68 65 6e 0a 09 09 23 20 43 75 72 72 65 6e   then...# Curren
1d10: 74 6c 79 20 6e 6f 20 4b 69 74 44 4c 4c 20 75 73  tly no KitDLL us
1d20: 65 73 20 5a 69 70 0a 09 09 69 73 7a 69 70 3d 22  es Zip...iszip="
1d30: 30 22 0a 09 66 69 0a 0a 09 66 6f 72 20 76 65 72  0"..fi...for ver
1d40: 73 69 6f 6e 20 69 6e 20 24 7b 56 45 52 53 49 4f  sion in ${VERSIO
1d50: 4e 53 7d 3b 20 64 6f 0a 09 09 23 20 57 6f 72 6b  NS}; do...# Work
1d60: 20 61 72 6f 75 6e 64 20 63 68 61 6e 67 65 73 20   around changes 
1d70: 69 6e 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  in default behav
1d80: 69 6f 75 72 0a 09 09 63 61 73 65 20 22 24 7b 76  iour...case "${v
1d90: 65 72 73 69 6f 6e 7d 22 20 69 6e 0a 09 09 09 38  ersion}" in....8
1da0: 2e 36 2e 2a 7c 63 76 73 5f 48 45 41 44 29 0a 09  .6.*|cvs_HEAD)..
1db0: 09 09 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  ...kit="$(echo "
1dc0: 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73  ${kit}" | sed 's
1dd0: 40 2d 74 68 72 65 61 64 65 64 40 2d 75 6e 74 68  @-threaded@-unth
1de0: 72 65 61 64 65 64 40 27 29 22 0a 09 09 09 09 61  readed@')".....a
1df0: 72 67 73 3d 22 24 28 65 63 68 6f 20 22 24 7b 61  rgs="$(echo "${a
1e00: 72 67 73 7d 22 20 7c 20 73 65 64 20 27 73 40 20  rgs}" | sed 's@ 
1e10: 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65 61 64 73  --enable-threads
1e20: 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74 68 72 65  @ --disable-thre
1e30: 61 64 73 40 27 29 22 0a 09 09 09 09 3b 3b 0a 09  ads@')".....;;..
1e40: 09 65 73 61 63 0a 0a 09 09 23 20 43 72 65 61 74  .esac....# Creat
1e50: 65 20 54 63 6c 6b 69 74 0a 09 09 69 66 20 5b 20  e Tclkit...if [ 
1e60: 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31  "${kitdll}" = "1
1e70: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65  " ]; then....cre
1e80: 61 74 65 64 6b 69 74 3d 22 6c 69 62 74 63 6c 6b  atedkit="libtclk
1e90: 69 74 2a 2e 64 6c 6c 20 6c 69 62 74 63 6c 6b 69  it*.dll libtclki
1ea0: 74 2a 2e 2a 22 0a 09 09 09 6f 75 74 70 75 74 6e  t*.*"....outputn
1eb0: 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f  ame="${TESTDIR}/
1ec0: 6b 69 74 73 2f 6c 69 62 74 63 6c 6b 69 74 2d 24  kits/libtclkit-$
1ed0: 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74 7d  {version}-${kit}
1ee0: 22 0a 09 09 09 66 61 69 6c 6f 75 74 70 75 74 6e  "....failoutputn
1ef0: 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52 7d 2f  ame="${TESTDIR}/
1f00: 6b 69 74 73 2f 66 61 69 6c 65 64 2f 6c 69 62 74  kits/failed/libt
1f10: 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d  clkit-${version}
1f20: 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 73 64 6b 3d  -${kit}"....sdk=
1f30: 22 6c 69 62 74 63 6c 6b 69 74 2d 73 64 6b 2d 24  "libtclkit-sdk-$
1f40: 7b 76 65 72 73 69 6f 6e 7d 2e 74 61 72 2e 67 7a  {version}.tar.gz
1f50: 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 72 65 61  "...else....crea
1f60: 74 65 64 6b 69 74 3d 22 74 63 6c 6b 69 74 2d 24  tedkit="tclkit-$
1f70: 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 6f 75  {version}"....ou
1f80: 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54  tputname="${TEST
1f90: 44 49 52 7d 2f 6b 69 74 73 2f 74 63 6c 6b 69 74  DIR}/kits/tclkit
1fa0: 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69  -${version}-${ki
1fb0: 74 7d 22 0a 09 09 09 66 61 69 6c 6f 75 74 70 75  t}"....failoutpu
1fc0: 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49 52  tname="${TESTDIR
1fd0: 7d 2f 6b 69 74 73 2f 66 61 69 6c 65 64 2f 74 63  }/kits/failed/tc
1fe0: 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d  lkit-${version}-
1ff0: 24 7b 6b 69 74 7d 22 0a 09 09 09 73 64 6b 3d 27  ${kit}"....sdk='
2000: 27 0a 09 09 66 69 0a 09 09 62 75 69 6c 64 6c 6f  '...fi...buildlo
2010: 67 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  g="${outputname}
2020: 2d 62 75 69 6c 64 2e 6c 6f 67 22 0a 09 09 66 61  -build.log"...fa
2030: 69 6c 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 66 61  ilbuildlog="${fa
2040: 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 62 75  iloutputname}-bu
2050: 69 6c 64 2e 6c 6f 67 22 0a 09 09 74 65 73 74 72  ild.log"...testr
2060: 65 73 75 6c 74 73 6c 6f 67 3d 22 24 7b 6f 75 74  esultslog="${out
2070: 70 75 74 6e 61 6d 65 7d 2d 74 65 73 74 73 2e 6c  putname}-tests.l
2080: 6f 67 22 0a 0a 09 09 69 66 20 5b 20 21 20 2d 66  og"....if [ ! -f
2090: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
20a0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 75 6e 73 65   ]; then....unse
20b0: 74 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  t KITCREATOR_PKG
20c0: 53 20 53 54 41 54 49 43 54 4b 20 53 54 52 49 50  S STATICTK STRIP
20d0: 0a 0a 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b  .....if [ -f "${
20e0: 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22  failoutputname}"
20f0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68   ]; then.....ech
2100: 6f 20 22 53 6b 69 70 70 69 6e 67 20 72 65 62 75  o "Skipping rebu
2110: 69 6c 64 69 6e 67 20 66 61 69 6c 65 64 20 6b 69  ilding failed ki
2120: 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  t ${version}/${k
2130: 69 74 7d 20 2e 2e 2e 22 0a 0a 09 09 09 09 66 61  it} ..."......fa
2140: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
2150: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
2160: 7d 2d 62 75 69 6c 64 22 0a 0a 09 09 09 09 63 6f  }-build"......co
2170: 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09  ntinue....fi....
2180: 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 09 09 09  .rm -f tclsh....
2190: 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 63 6c 65  ./kitcreator cle
21a0: 61 6e 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e  an >/dev/null 2>
21b0: 2f 64 65 76 2f 6e 75 6c 6c 0a 0a 09 09 09 65 63  /dev/null.....ec
21c0: 68 6f 20 22 43 72 65 61 74 69 6e 67 20 54 63 6c  ho "Creating Tcl
21d0: 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24  kit ${version}/$
21e0: 7b 6b 69 74 7d 2e 2e 2e 22 0a 09 09 09 65 63 68  {kit}..."....ech
21f0: 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 73 74  o " *** Build st
2200: 61 72 74 65 64 20 24 28 77 68 6f 61 6d 69 29 40  arted $(whoami)@
2210: 24 28 68 6f 73 74 6e 61 6d 65 29 20 6f 6e 20 24  $(hostname) on $
2220: 28 64 61 74 65 29 22 20 3e 20 22 24 7b 62 75 69  (date)" > "${bui
2230: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2240: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2250: 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20 2a 2a  g}"....echo " **
2260: 2a 20 42 75 69 6c 64 20 53 63 72 69 70 74 22 20  * Build Script" 
2270: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2280: 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74  .....if [ "${not
2290: 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  k}" = "1" ]; the
22a0: 6e 0a 09 09 09 09 4b 49 54 43 52 45 41 54 4f 52  n.....KITCREATOR
22b0: 5f 50 4b 47 53 3d 27 69 74 63 6c 20 6d 6b 34 74  _PKGS='itcl mk4t
22c0: 63 6c 27 0a 09 09 09 66 69 0a 0a 09 09 09 69 66  cl'....fi.....if
22d0: 20 5b 20 22 24 7b 6e 6f 6d 6b 34 7d 22 20 3d 20   [ "${nomk4}" = 
22e0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
22f0: 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54 43 52  if [ -z "${KITCR
2300: 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20  EATOR_PKGS}" ]; 
2310: 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43 52 45  then......KITCRE
2320: 41 54 4f 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20  ATOR_PKGS='itcl 
2330: 74 6b 27 0a 09 09 09 09 65 6c 73 65 0a 09 09 09  tk'.....else....
2340: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
2350: 53 3d 22 24 28 65 63 68 6f 20 22 24 7b 4b 49 54  S="$(echo "${KIT
2360: 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 7c  CREATOR_PKGS}" |
2370: 20 73 65 64 20 27 73 40 6d 6b 34 74 63 6c 40 40   sed 's@mk4tcl@@
2380: 27 29 22 0a 09 09 09 09 66 69 0a 09 09 09 66 69  ')".....fi....fi
2390: 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6b 69 74  .....if [ "${kit
23a0: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
23b0: 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d 7a 20  hen.....if [ -z 
23c0: 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  "${KITCREATOR_PK
23d0: 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  GS}" ]; then....
23e0: 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47  ..KITCREATOR_PKG
23f0: 53 3d 27 74 6b 20 69 74 63 6c 20 6d 6b 34 74 63  S='tk itcl mk4tc
2400: 6c 20 6b 69 74 64 6c 6c 27 0a 09 09 09 09 65 6c  l kitdll'.....el
2410: 73 65 0a 09 09 09 09 09 4b 49 54 43 52 45 41 54  se......KITCREAT
2420: 4f 52 5f 50 4b 47 53 3d 22 24 7b 4b 49 54 43 52  OR_PKGS="${KITCR
2430: 45 41 54 4f 52 5f 50 4b 47 53 7d 20 6b 69 74 64  EATOR_PKGS} kitd
2440: 6c 6c 22 0a 09 09 09 09 66 69 0a 09 09 09 66 69  ll".....fi....fi
2450: 0a 0a 09 09 09 65 78 70 6f 72 74 20 4b 49 54 43  .....export KITC
2460: 52 45 41 54 4f 52 5f 50 4b 47 53 0a 0a 09 09 09  REATOR_PKGS.....
2470: 69 66 20 5b 20 2d 6e 20 22 24 7b 4b 49 54 43 52  if [ -n "${KITCR
2480: 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b 20  EATOR_PKGS}" ]; 
2490: 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 20  then.....echo " 
24a0: 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47 53   KITCREATOR_PKGS
24b0: 3d 5c 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f  =\"${KITCREATOR_
24c0: 50 4b 47 53 7d 5c 22 22 20 3e 3e 20 22 24 7b 62  PKGS}\"" >> "${b
24d0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63  uildlog}".....ec
24e0: 68 6f 20 22 20 20 65 78 70 6f 72 74 20 4b 49 54  ho "  export KIT
24f0: 43 52 45 41 54 4f 52 5f 50 4b 47 53 22 20 3e 3e  CREATOR_PKGS" >>
2500: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2510: 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22 24  ..fi.....if [ "$
2520: 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d 20 22 31  {statictk}" = "1
2530: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 53 54  " ]; then.....ST
2540: 41 54 49 43 54 4b 3d 22 31 22 0a 09 09 09 09 65  ATICTK="1".....e
2550: 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 0a 0a  xport STATICTK..
2560: 09 09 09 09 65 63 68 6f 20 22 20 20 53 54 41 54  ....echo "  STAT
2570: 49 43 54 4b 3d 5c 22 24 7b 53 54 41 54 49 43 54  ICTK=\"${STATICT
2580: 4b 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69 6c  K}\"" >> "${buil
2590: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
25a0: 22 20 20 65 78 70 6f 72 74 20 53 54 41 54 49 43  "  export STATIC
25b0: 54 4b 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  TK" >> "${buildl
25c0: 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09 69  og}"....fi.....i
25d0: 66 20 65 63 68 6f 20 22 24 7b 61 72 67 73 7d 22  f echo "${args}"
25e0: 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 2d 65 6e   | grep -- '--en
25f0: 61 62 6c 65 2d 73 79 6d 62 6f 6c 73 27 20 3e 2f  able-symbols' >/
2600: 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09  dev/null; then..
2610: 09 09 09 53 54 52 49 50 3d 27 74 72 75 65 27 0a  ...STRIP='true'.
2620: 09 09 09 09 65 78 70 6f 72 74 20 53 54 52 49 50  ....export STRIP
2630: 0a 0a 09 09 09 09 65 63 68 6f 20 22 20 20 53 54  ......echo "  ST
2640: 52 49 50 3d 27 74 72 75 65 27 22 20 3e 3e 20 22  RIP='true'" >> "
2650: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2660: 09 65 63 68 6f 20 22 20 20 65 78 70 6f 72 74 20  .echo "  export 
2670: 53 54 52 49 50 22 20 3e 3e 20 22 24 7b 62 75 69  STRIP" >> "${bui
2680: 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09  ldlog}"....fi...
2690: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 63 72 65  ..if [ "${kitcre
26a0: 61 74 6f 72 7d 22 20 21 3d 20 22 2e 2f 6b 69 74  ator}" != "./kit
26b0: 63 72 65 61 74 6f 72 22 20 5d 3b 20 74 68 65 6e  creator" ]; then
26c0: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 6d 6b 64  .....echo "  mkd
26d0: 69 72 20 62 75 69 6c 64 22 20 3e 3e 20 22 24 7b  ir build" >> "${
26e0: 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09  buildlog}"......
26f0: 23 20 53 65 76 65 72 61 6c 20 62 75 69 6c 64 20  # Several build 
2700: 73 63 72 69 70 74 73 20 72 65 6c 79 20 6f 6e 20  scripts rely on 
2710: 6d 69 6e 6b 69 74 20 74 6f 20 77 6f 72 6b 0a 09  minkit to work..
2720: 09 09 09 69 66 20 67 72 65 70 20 27 2e 2f 62 75  ...if grep './bu
2730: 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27  ild/make-minkit'
2740: 20 22 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22   "${kitcreator}"
2750: 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64   >/dev/null 2>/d
2760: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
2770: 09 09 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c  ...echo "  cat <
2780: 3c 20 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62  < \__EOF__ > ./b
2790: 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74  uild/make-minkit
27a0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
27b0: 7d 22 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e  }"......sed 's@^
27c0: 40 20 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f  @  @'  './build/
27d0: 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20  make-minkit' >> 
27e0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
27f0: 09 09 09 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46  ...echo "  __EOF
2800: 5f 5f 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  __" >> "${buildl
2810: 6f 67 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 27  og}"......echo '
2820: 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  ' >> "${buildlog
2830: 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 23  }".....fi......#
2840: 20 53 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73   Several build s
2850: 63 72 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d  cripts rely on m
2860: 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d  ake-kit-crosscom
2870: 70 69 6c 65 20 74 6f 20 77 6f 72 6b 0a 09 09 09  pile to work....
2880: 09 69 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c  .if grep './buil
2890: 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73  d/make-kit-cross
28a0: 63 6f 6d 70 69 6c 65 27 20 22 24 7b 6b 69 74 63  compile' "${kitc
28b0: 72 65 61 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e  reator}" >/dev/n
28c0: 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b  ull 2>/dev/null;
28d0: 20 74 68 65 6e 0a 09 09 09 09 09 65 63 68 6f 20   then......echo 
28e0: 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46  "  cat << \__EOF
28f0: 5f 5f 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b  __ > ./build/mak
2900: 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69  e-kit-crosscompi
2910: 6c 65 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  le" >> "${buildl
2920: 6f 67 7d 22 0a 09 09 09 09 09 73 65 64 20 27 73  og}"......sed 's
2930: 40 5e 40 20 20 40 27 20 20 27 2e 2f 62 75 69 6c  @^@  @'  './buil
2940: 64 2f 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73  d/make-kit-cross
2950: 63 6f 6d 70 69 6c 65 27 20 3e 3e 20 22 24 7b 62  compile' >> "${b
2960: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65  uildlog}"......e
2970: 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20  cho "  __EOF__" 
2980: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2990: 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e  ......echo '' >>
29a0: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
29b0: 09 09 09 66 69 0a 0a 09 09 09 09 65 63 68 6f 20  ...fi......echo 
29c0: 22 20 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46  "  cat << \__EOF
29d0: 5f 5f 20 3e 20 24 7b 6b 69 74 63 72 65 61 74 6f  __ > ${kitcreato
29e0: 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  r}" >> "${buildl
29f0: 6f 67 7d 22 0a 09 09 09 09 73 65 64 20 27 73 40  og}".....sed 's@
2a00: 5e 40 20 20 40 27 20 20 22 24 7b 6b 69 74 63 72  ^@  @'  "${kitcr
2a10: 65 61 74 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75  eator}" >> "${bu
2a20: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68  ildlog}".....ech
2a30: 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e  o "  __EOF__" >>
2a40: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2a50: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2a60: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66  {buildlog}"....f
2a70: 69 0a 09 09 09 65 63 68 6f 20 22 20 20 5c 22 24  i....echo "  \"$
2a80: 7b 6b 69 74 63 72 65 61 74 6f 72 7d 5c 22 20 5c  {kitcreator}\" \
2a90: 22 24 7b 76 65 72 73 69 6f 6e 7d 5c 22 20 24 7b  "${version}\" ${
2aa0: 61 72 67 73 7d 22 20 3e 3e 20 22 24 7b 62 75 69  args}" >> "${bui
2ab0: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2ac0: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2ad0: 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e  g}"....echo '' >
2ae0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
2af0: 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24  ...echo '' >> "$
2b00: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65  {buildlog}"....e
2b10: 63 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20  cho " *** Build 
2b20: 52 65 73 75 6c 74 73 22 20 3e 3e 20 22 24 7b 62  Results" >> "${b
2b30: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
2b40: 6f 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64  o '' >> "${build
2b50: 6c 6f 67 7d 22 0a 0a 09 09 09 62 75 69 6c 64 66  log}".....buildf
2b60: 61 69 6c 65 64 3d 22 30 22 0a 09 09 09 22 24 7b  ailed="0"...."${
2b70: 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 22 24 7b  kitcreator}" "${
2b80: 76 65 72 73 69 6f 6e 7d 22 20 24 7b 61 72 67 73  version}" ${args
2b90: 7d 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  } >> "${buildlog
2ba0: 7d 22 20 32 3e 26 31 20 7c 7c 20 62 75 69 6c 64  }" 2>&1 || build
2bb0: 66 61 69 6c 65 64 3d 22 31 22 0a 09 09 09 67 72  failed="1"....gr
2bc0: 65 70 20 2d 6e 20 27 5e 27 20 2a 2f 62 75 69 6c  ep -n '^' */buil
2bd0: 64 2e 6c 6f 67 20 3e 3e 20 22 24 7b 62 75 69 6c  d.log >> "${buil
2be0: 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 0a 09 09 09  dlog}" 2>&1.....
2bf0: 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22  if [ "${kitdll}"
2c00: 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09   = "1" ]; then..
2c10: 09 09 09 23 20 43 72 65 61 74 65 20 74 65 73 74  ...# Create test
2c20: 20 64 72 69 76 65 72 73 20 66 6f 72 20 4b 69 74   drivers for Kit
2c30: 44 4c 4c 0a 09 09 09 09 28 0a 09 09 09 09 09 65  DLL.....(......e
2c40: 63 68 6f 20 22 22 0a 09 09 09 09 09 65 63 68 6f  cho ""......echo
2c50: 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22   ""......echo ""
2c60: 0a 09 09 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a  ......echo " ***
2c70: 20 42 75 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c   Building KitDLL
2c80: 20 74 65 73 74 20 64 72 69 76 65 72 20 28 74 63   test driver (tc
2c90: 6c 73 68 29 22 0a 09 09 09 09 09 65 63 68 6f 20  lsh)"......echo 
2ca0: 22 22 0a 0a 09 09 09 09 09 63 64 20 6b 69 74 73  "".......cd kits
2cb0: 68 2f 62 75 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f  h/build/kitsh-*/
2cc0: 20 7c 7c 20 65 78 69 74 20 31 0a 09 09 09 09 09   || exit 1......
2cd0: 6d 61 6b 65 20 74 63 6c 73 68 0a 09 09 09 09 09  make tclsh......
2ce0: 63 70 20 74 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e  cp tclsh ../../.
2cf0: 2e 2f 0a 09 09 09 09 29 20 3e 3e 20 22 24 7b 62  ./.....) >> "${b
2d00: 75 69 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 09  uildlog}" 2>&1..
2d10: 09 09 66 69 0a 0a 09 09 09 23 20 50 65 72 66 6f  ..fi.....# Perfo
2d20: 72 6d 20 77 69 6c 64 63 61 72 64 20 65 78 70 61  rm wildcard expa
2d30: 6e 73 69 6f 6e 0a 09 09 09 63 72 65 61 74 65 64  nsion....created
2d40: 6b 69 74 3d 22 24 28 6c 73 20 2d 66 31 20 24 7b  kit="$(ls -f1 ${
2d50: 63 72 65 61 74 65 64 6b 69 74 7d 20 32 3e 2f 64  createdkit} 2>/d
2d60: 65 76 2f 6e 75 6c 6c 20 7c 20 67 72 65 70 20 2d  ev/null | grep -
2d70: 76 20 27 5c 2e 74 61 72 5c 2e 67 7a 24 27 20 7c  v '\.tar\.gz$' |
2d80: 20 68 65 61 64 20 2d 6e 20 31 29 22 0a 0a 09 09   head -n 1)"....
2d90: 09 69 66 20 5b 20 21 20 2d 66 20 22 24 7b 63 72  .if [ ! -f "${cr
2da0: 65 61 74 65 64 6b 69 74 7d 22 20 5d 3b 20 74 68  eatedkit}" ]; th
2db0: 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 46 61 69  en.....echo "Fai
2dc0: 6c 65 64 20 74 6f 20 63 72 65 61 74 65 20 6b 69  led to create ki
2dd0: 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  t ${version}/${k
2de0: 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61  it}" >&2......fa
2df0: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
2e00: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
2e10: 7d 2d 62 75 69 6c 64 22 0a 0a 09 09 09 09 74 6f  }-build"......to
2e20: 75 63 68 20 22 24 7b 66 61 69 6c 6f 75 74 70 75  uch "${failoutpu
2e30: 74 6e 61 6d 65 7d 22 0a 09 09 09 09 6d 76 20 22  tname}".....mv "
2e40: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 20 22 24 7b  ${buildlog}" "${
2e50: 66 61 69 6c 62 75 69 6c 64 6c 6f 67 7d 22 0a 0a  failbuildlog}"..
2e60: 09 09 09 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a  ....rm -f tclsh.
2e70: 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  .....continue...
2e80: 09 66 69 0a 0a 09 09 09 23 20 56 65 72 69 66 79  .fi.....# Verify
2e90: 20 73 61 6e 69 74 79 20 6f 66 20 63 72 65 61 74   sanity of creat
2ea0: 65 64 20 6b 69 74 0a 09 09 09 69 73 73 61 6e 65  ed kit....issane
2eb0: 3d 31 0a 0a 09 09 09 23 23 20 56 65 72 69 66 79  =1.....## Verify
2ec0: 20 74 68 61 74 20 57 69 6e 33 32 20 62 75 69 6c   that Win32 buil
2ed0: 64 73 20 61 72 65 20 6f 66 20 63 6f 72 72 65 63  ds are of correc
2ee0: 74 20 74 79 70 65 0a 09 09 09 23 23 20 56 65 72  t type....## Ver
2ef0: 69 66 79 20 74 68 61 74 20 44 4c 4c 20 62 75 69  ify that DLL bui
2f00: 6c 64 73 20 61 72 65 20 6f 66 20 63 6f 72 72 65  lds are of corre
2f10: 63 74 20 74 79 70 65 0a 09 09 09 63 61 73 65 20  ct type....case 
2f20: 22 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b  "-${version}-${k
2f30: 69 74 7d 2d 22 20 69 6e 0a 09 09 09 09 2a 2d 77  it}-" in.....*-w
2f40: 69 6e 5b 33 36 5d 5b 32 34 5d 2d 6b 69 74 64 6c  in[36][24]-kitdl
2f50: 6c 2d 2a 7c 2a 2d 77 69 6e 5b 33 36 5d 5b 32 34  l-*|*-win[36][24
2f60: 5d 2d 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a 09 09  ]-*-kitdll-*)...
2f70: 09 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b  ...if ! file "${
2f80: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67  createdkit}" | g
2f90: 72 65 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 27  rep 'MS Windows'
2fa0: 20 7c 20 67 72 65 70 20 27 28 44 4c 4c 29 27 20   | grep '(DLL)' 
2fb0: 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e  >/dev/null; then
2fc0: 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a  .......issane=0.
2fd0: 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a  .....fi......;;.
2fe0: 09 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a 29 0a  ....*-kitdll-*).
2ff0: 09 09 09 09 09 69 66 20 21 20 66 69 6c 65 20 22  .....if ! file "
3000: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 7c  ${createdkit}" |
3010: 20 67 72 65 70 20 27 73 68 61 72 65 64 20 6f 62   grep 'shared ob
3020: 6a 65 63 74 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c  ject' >/dev/null
3030: 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69 73 73  ; then.......iss
3040: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
3050: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 5b  ...;;.....*-win[
3060: 33 36 5d 5b 32 34 5d 2d 6e 6f 74 6b 2d 2a 7c 2a  36][24]-notk-*|*
3070: 2d 77 69 6e 5b 33 36 5d 5b 32 34 5d 2d 2a 2d 6e  -win[36][24]-*-n
3080: 6f 74 6b 2d 2a 29 0a 09 09 09 09 09 69 66 20 21  otk-*)......if !
3090: 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74 65 64   file "${created
30a0: 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27 4d 53  kit}" | grep 'MS
30b0: 20 57 69 6e 64 6f 77 73 27 20 7c 20 67 72 65 70   Windows' | grep
30c0: 20 27 28 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64   '(console)' >/d
30d0: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
30e0: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
30f0: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
3100: 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20 63 6f  k for being a co
3110: 6e 73 6f 6c 65 20 61 70 70 6c 69 63 61 74 69 6f  nsole applicatio
3120: 6e 22 20 3e 26 32 0a 09 09 09 09 09 09 69 73 73  n" >&2.......iss
3130: 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a 09 09  ane=0......fi...
3140: 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 5b  ...;;.....*-win[
3150: 33 36 5d 5b 32 34 5d 2d 2a 29 0a 09 09 09 09 09  36][24]-*)......
3160: 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65  if ! file "${cre
3170: 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70  atedkit}" | grep
3180: 20 27 4d 53 20 57 69 6e 64 6f 77 73 27 20 7c 20   'MS Windows' | 
3190: 67 72 65 70 20 27 28 47 55 49 29 27 20 3e 2f 64  grep '(GUI)' >/d
31a0: 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09  ev/null; then...
31b0: 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61  ....echo "Kit fa
31c0: 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68 65 63  iled sanity chec
31d0: 6b 20 66 6f 72 20 62 65 69 6e 67 20 61 20 47 55  k for being a GU
31e0: 49 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e  I application" >
31f0: 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d  &2.......issane=
3200: 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b  0......fi......;
3210: 3b 0a 09 09 09 65 73 61 63 0a 0a 09 09 09 23 23  ;....esac.....##
3220: 20 56 65 72 69 66 79 20 74 68 65 20 62 75 69 6c   Verify the buil
3230: 64 20 63 6f 6d 70 6c 65 74 65 64 20 77 69 74 68  d completed with
3240: 6f 75 74 20 77 61 72 6e 69 6e 67 73 0a 09 09 09  out warnings....
3250: 69 66 20 5b 20 22 24 7b 62 75 69 6c 64 66 61 69  if [ "${buildfai
3260: 6c 65 64 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  led}" = "1" ]; t
3270: 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b 69  hen.....echo "Ki
3280: 74 20 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20  t failed sanity 
3290: 63 68 65 63 6b 20 66 6f 72 20 42 75 69 6c 64 69  check for Buildi
32a0: 6e 67 22 20 3e 26 32 0a 0a 09 09 09 09 69 73 73  ng" >&2......iss
32b0: 61 6e 65 3d 30 0a 09 09 09 66 69 0a 0a 09 09 09  ane=0....fi.....
32c0: 23 20 4d 61 6b 65 20 6e 6f 74 65 20 6f 66 20 73  # Make note of s
32d0: 61 6e 69 74 79 20 66 61 69 6c 75 72 65 0a 09 09  anity failure...
32e0: 09 69 66 20 5b 20 22 24 7b 69 73 73 61 6e 65 7d  .if [ "${issane}
32f0: 22 20 21 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  " != "1" ]; then
3300: 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66  .....echo "Kit f
3310: 61 69 6c 65 64 20 73 61 6e 69 74 79 20 24 7b 76  ailed sanity ${v
3320: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20  ersion}/${kit}" 
3330: 3e 26 32 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d  >&2......failed=
3340: 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72  "${failed} ${ver
3350: 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e  sion}/${kit}-san
3360: 69 74 79 22 0a 0a 09 09 09 09 6d 76 20 22 24 7b  ity"......mv "${
3370: 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b  createdkit}" "${
3380: 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22  failoutputname}"
3390: 0a 09 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64  .....mv "${build
33a0: 6c 6f 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69  log}" "${failbui
33b0: 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20  ldlog}"......rm 
33c0: 2d 66 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f  -f tclsh......co
33d0: 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09  ntinue....fi....
33e0: 09 23 20 52 65 6e 61 6d 65 20 63 72 65 61 74 65  .# Rename create
33f0: 64 20 6b 69 74 20 74 6f 20 66 69 6e 61 6c 20 64  d kit to final d
3400: 65 73 74 69 6e 61 74 69 6f 6e 0a 09 09 09 6d 76  estination....mv
3410: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
3420: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3430: 0a 09 09 09 69 66 20 5b 20 2d 66 20 22 74 63 6c  ....if [ -f "tcl
3440: 73 68 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  sh" ]; then.....
3450: 6d 76 20 22 74 63 6c 73 68 22 20 22 24 7b 6f 75  mv "tclsh" "${ou
3460: 74 70 75 74 6e 61 6d 65 7d 2d 74 63 6c 73 68 22  tputname}-tclsh"
3470: 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 46 6f 72  ....fi.....# For
3480: 20 4b 69 74 44 4c 4c 2c 20 6d 61 6b 65 20 61 20   KitDLL, make a 
3490: 6e 6f 74 65 20 6f 66 20 74 68 65 20 6f 72 69 67  note of the orig
34a0: 69 6e 61 6c 20 6e 61 6d 65 0a 09 09 09 69 66 20  inal name....if 
34b0: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
34c0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  "1" ]; then.....
34d0: 65 63 68 6f 20 22 24 7b 63 72 65 61 74 65 64 6b  echo "${createdk
34e0: 69 74 7d 22 20 3e 20 22 24 7b 6f 75 74 70 75 74  it}" > "${output
34f0: 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a  name}-origname".
3500: 0a 09 09 09 09 69 66 20 5b 20 2d 66 20 22 24 7b  .....if [ -f "${
3510: 73 64 6b 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09  sdk}" ]; then...
3520: 09 09 09 6d 76 20 22 24 7b 73 64 6b 7d 22 20 22  ...mv "${sdk}" "
3530: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 73 64  ${outputname}-sd
3540: 6b 2e 74 61 72 2e 67 7a 22 0a 09 09 09 09 66 69  k.tar.gz".....fi
3550: 0a 09 09 09 66 69 0a 09 09 66 69 0a 0a 09 09 23  ....fi...fi....#
3560: 20 54 65 73 74 20 7a 69 70 20 73 74 61 74 75 73   Test zip status
3570: 0a 09 09 69 66 20 75 6e 7a 69 70 20 2d 6c 20 22  ...if unzip -l "
3580: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 32  ${outputname}" 2
3590: 3e 26 31 20 7c 20 67 72 65 70 20 27 62 6f 6f 74  >&1 | grep 'boot
35a0: 5c 2e 74 63 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c  \.tcl' >/dev/nul
35b0: 6c 3b 20 74 68 65 6e 0a 09 09 09 63 61 6e 75 6e  l; then....canun
35c0: 7a 69 70 3d 22 31 22 0a 09 09 65 6c 73 65 0a 09  zip="1"...else..
35d0: 09 09 63 61 6e 75 6e 7a 69 70 3d 22 30 22 0a 09  ..canunzip="0"..
35e0: 09 66 69 0a 0a 09 09 69 66 20 5b 20 22 24 7b 69  .fi....if [ "${i
35f0: 73 7a 69 70 7d 22 20 21 3d 20 22 24 7b 63 61 6e  szip}" != "${can
3600: 75 6e 7a 69 70 7d 22 20 5d 3b 20 74 68 65 6e 0a  unzip}" ]; then.
3610: 09 09 09 65 63 68 6f 20 22 46 61 69 6c 65 64 20  ...echo "Failed 
3620: 74 6f 20 75 6e 7a 69 70 20 7a 69 70 6b 69 74 20  to unzip zipkit 
3630: 6f 72 20 77 61 73 20 61 62 6c 65 20 74 6f 20 75  or was able to u
3640: 6e 7a 69 70 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20  nzip non-zipkit 
3650: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
3660: 7d 22 20 3e 26 32 0a 0a 09 09 09 66 61 69 6c 65  }" >&2.....faile
3670: 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76  d="${failed} ${v
3680: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a  ersion}/${kit}-z
3690: 69 70 22 0a 0a 09 09 09 63 6f 6e 74 69 6e 75 65  ip".....continue
36a0: 0a 09 09 66 69 0a 0a 09 09 23 20 44 6f 20 6e 6f  ...fi....# Do no
36b0: 74 20 63 6f 6e 74 69 6e 75 65 20 70 61 73 74 20  t continue past 
36c0: 68 65 72 65 20 66 6f 72 20 75 6e 2d 72 75 6e 6e  here for un-runn
36d0: 61 62 6c 65 20 6b 69 74 73 0a 09 09 69 66 20 5b  able kits...if [
36e0: 20 22 24 7b 72 75 6e 6e 61 62 6c 65 7d 22 20 21   "${runnable}" !
36f0: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
3700: 09 63 6f 6e 74 69 6e 75 65 0a 09 09 66 69 0a 0a  .continue...fi..
3710: 09 09 23 20 49 66 20 74 68 65 20 6e 61 6d 65 20  ..# If the name 
3720: 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20  of the original 
3730: 62 75 69 6c 64 20 6d 61 74 74 65 72 73 2c 20 73  build matters, s
3740: 79 6d 6c 69 6e 6b 20 69 74 20 75 70 0a 09 09 69  ymlink it up...i
3750: 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75 74  f [ -f "${output
3760: 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20  name}-origname" 
3770: 5d 3b 20 74 68 65 6e 0a 09 09 09 63 72 65 61 74  ]; then....creat
3780: 65 64 6b 69 74 3d 22 24 28 63 61 74 20 22 24 7b  edkit="$(cat "${
3790: 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67  outputname}-orig
37a0: 6e 61 6d 65 22 29 22 0a 0a 09 09 09 6c 6e 20 2d  name")".....ln -
37b0: 73 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d  s "${outputname}
37c0: 22 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  " "${createdkit}
37d0: 22 0a 09 09 66 69 0a 0a 09 09 23 20 50 65 72 66  "...fi....# Perf
37e0: 6f 72 6d 20 62 61 74 74 65 72 79 20 6f 66 20 74  orm battery of t
37f0: 65 73 74 73 0a 09 09 23 23 20 43 6c 65 61 6e 20  ests...## Clean 
3800: 74 65 73 74 73 20 6c 6f 67 0a 09 09 72 6d 20 2d  tests log...rm -
3810: 66 20 22 24 7b 74 65 73 74 72 65 73 75 6c 74 73  f "${testresults
3820: 6c 6f 67 7d 22 0a 09 09 66 6f 72 20 74 65 73 74  log}"...for test
3830: 73 63 70 20 69 6e 20 22 24 7b 54 45 53 54 44 49  scp in "${TESTDI
3840: 52 7d 22 2f 74 65 73 74 73 2f 2a 2e 74 63 6c 3b  R}"/tests/*.tcl;
3850: 20 64 6f 0a 09 09 09 74 65 73 74 73 63 70 5f 74   do....testscp_t
3860: 61 67 3d 22 24 28 62 61 73 65 6e 61 6d 65 20 22  ag="$(basename "
3870: 24 7b 74 65 73 74 73 63 70 7d 22 20 2e 74 63 6c  ${testscp}" .tcl
3880: 29 22 0a 09 09 09 74 65 73 74 73 63 70 70 72 65  )"....testscppre
3890: 3d 22 24 28 64 69 72 6e 61 6d 65 20 22 24 7b 74  ="$(dirname "${t
38a0: 65 73 74 73 63 70 7d 22 29 2f 24 7b 74 65 73 74  estscp}")/${test
38b0: 73 63 70 5f 74 61 67 7d 2e 73 68 22 0a 09 09 09  scp_tag}.sh"....
38c0: 73 63 70 6c 6f 67 66 69 6c 65 3d 22 24 7b 6f 75  scplogfile="${ou
38d0: 74 70 75 74 6e 61 6d 65 7d 2d 24 7b 74 65 73 74  tputname}-${test
38e0: 73 63 70 5f 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09  scp_tag}.log"...
38f0: 09 09 23 20 49 66 20 61 20 63 6f 6d 6d 61 6e 64  ..# If a command
3900: 20 69 73 20 72 65 71 75 69 72 65 64 20 74 6f 20   is required to 
3910: 73 74 61 72 74 20 74 68 65 20 6b 69 74 2c 20 70  start the kit, p
3920: 72 65 70 61 72 65 20 74 6f 20 6b 69 6c 6c 20 69  repare to kill i
3930: 74 0a 09 09 09 23 20 69 6e 20 63 61 73 65 20 6f  t....# in case o
3940: 66 20 74 69 6d 65 6f 75 74 2e 0a 09 09 09 23 23  f timeout.....##
3950: 20 54 65 6d 70 6f 72 61 72 69 6c 79 20 64 69 73   Temporarily dis
3960: 61 62 6c 65 64 20 73 69 6e 63 65 20 63 75 72 72  abled since curr
3970: 65 6e 74 6c 79 20 69 74 20 69 73 20 63 61 75 73  ently it is caus
3980: 69 6e 67 0a 09 09 09 23 23 20 6d 6f 72 65 20 70  ing....## more p
3990: 72 6f 62 6c 65 6d 73 20 69 6e 20 74 68 65 20 66  roblems in the f
39a0: 6f 72 6d 20 6f 66 20 74 65 73 74 73 20 62 65 69  orm of tests bei
39b0: 6e 67 20 6b 69 6c 6c 65 64 0a 09 09 09 23 23 20  ng killed....## 
39c0: 70 72 65 6d 61 74 75 72 65 6c 79 20 74 68 61 6e  prematurely than
39d0: 20 77 65 20 61 72 65 20 68 61 76 69 6e 67 20 69   we are having i
39e0: 73 73 75 65 73 20 77 69 74 68 20 74 65 73 74 73  ssues with tests
39f0: 0a 09 09 09 23 23 20 68 61 6e 67 69 6e 67 0a 09  ....## hanging..
3a00: 09 09 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d  ..kitrunkillpid=
3a10: 22 22 0a 09 09 09 69 66 20 5b 20 22 31 22 20 3d  ""....if [ "1" =
3a20: 20 22 30 22 20 2d 61 20 2d 6e 20 22 24 7b 6b 69   "0" -a -n "${ki
3a30: 74 72 75 6e 63 6d 64 7d 22 20 5d 3b 20 74 68 65  truncmd}" ]; the
3a40: 6e 0a 09 09 09 09 28 0a 09 09 09 09 09 73 6c 65  n.....(......sle
3a50: 65 70 20 31 32 30 0a 09 09 09 09 09 6b 69 6c 6c  ep 120......kill
3a60: 61 6c 6c 20 22 24 28 62 61 73 65 6e 61 6d 65 20  all "$(basename 
3a70: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 29  "${outputname}")
3a80: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
3a90: 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 09 29 20 3e  dev/null.....) >
3aa0: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
3ab0: 2f 6e 75 6c 6c 20 26 0a 09 09 09 09 6b 69 74 72  /null &.....kitr
3ac0: 75 6e 6b 69 6c 6c 70 69 64 3d 22 24 21 22 0a 09  unkillpid="$!"..
3ad0: 09 09 66 69 0a 0a 09 09 09 28 0a 09 09 09 09 69  ..fi.....(.....i
3ae0: 66 20 5b 20 2d 66 20 22 24 7b 74 65 73 74 73 63  f [ -f "${testsc
3af0: 70 70 72 65 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  ppre}" ]; then..
3b00: 09 09 09 09 2e 20 22 24 7b 74 65 73 74 73 63 70  ..... "${testscp
3b10: 70 72 65 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09  pre}".....fi....
3b20: 09 09 69 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c  ..if [ "${kitdll
3b30: 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e  }" = "1" ]; then
3b40: 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d  ......${kitruncm
3b50: 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  d} "${outputname
3b60: 7d 2d 74 63 6c 73 68 22 20 22 24 7b 74 65 73 74  }-tclsh" "${test
3b70: 73 63 70 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e  scp}" "${outputn
3b80: 61 6d 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22  ame}" "${kit}" "
3b90: 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09  ${version}".....
3ba0: 65 6c 73 65 0a 09 09 09 09 09 24 7b 6b 69 74 72  else......${kitr
3bb0: 75 6e 63 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74  uncmd} "${output
3bc0: 6e 61 6d 65 7d 22 20 22 24 7b 74 65 73 74 73 63  name}" "${testsc
3bd0: 70 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  p}" "${outputnam
3be0: 65 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b  e}" "${kit}" "${
3bf0: 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 66 69  version}".....fi
3c00: 0a 09 09 09 29 20 3e 20 22 24 7b 73 63 70 6c 6f  ....) > "${scplo
3c10: 67 66 69 6c 65 7d 22 20 32 3e 26 31 0a 0a 09 09  gfile}" 2>&1....
3c20: 09 69 66 20 5b 20 22 24 3f 22 20 21 3d 20 22 30  .if [ "$?" != "0
3c30: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63  " ]; then.....ec
3c40: 68 6f 20 22 53 63 72 69 70 74 20 66 61 69 6c 65  ho "Script faile
3c50: 64 3a 20 24 7b 74 65 73 74 73 63 70 5f 74 61 67  d: ${testscp_tag
3c60: 7d 20 6f 6e 20 24 7b 76 65 72 73 69 6f 6e 7d 2f  } on ${version}/
3c70: 24 7b 6b 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09  ${kit}" >&2.....
3c80: 09 66 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65  .failed="${faile
3c90: 64 7d 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b  d} ${version}/${
3ca0: 6b 69 74 7d 2d 74 65 73 74 2d 24 7b 74 65 73 74  kit}-test-${test
3cb0: 73 63 70 5f 74 61 67 7d 22 0a 0a 09 09 09 09 65  scp_tag}"......e
3cc0: 63 68 6f 20 22 24 7b 74 65 73 74 73 63 70 5f 74  cho "${testscp_t
3cd0: 61 67 7d 3a 20 46 41 49 4c 22 20 3e 3e 20 20 22  ag}: FAIL" >>  "
3ce0: 24 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67  ${testresultslog
3cf0: 7d 22 0a 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65  }"......continue
3d00: 0a 09 09 09 66 69 0a 0a 09 09 09 23 20 4b 69 6c  ....fi.....# Kil
3d10: 6c 20 74 68 65 20 77 61 74 63 68 64 6f 67 20 66  l the watchdog f
3d20: 6f 72 20 74 68 69 73 20 69 74 65 72 61 74 69 6f  or this iteratio
3d30: 6e 0a 09 09 09 69 66 20 5b 20 2d 6e 20 22 24 7b  n....if [ -n "${
3d40: 6b 69 74 72 75 6e 6b 69 6c 6c 70 69 64 7d 22 20  kitrunkillpid}" 
3d50: 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6b 69 6c 6c  ]; then.....kill
3d60: 20 2d 39 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c   -9 "${kitrunkil
3d70: 6c 70 69 64 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c  lpid}" >/dev/nul
3d80: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09  l 2>/dev/null...
3d90: 09 66 69 0a 0a 09 09 09 65 63 68 6f 20 22 24 7b  .fi.....echo "${
3da0: 74 65 73 74 73 63 70 5f 74 61 67 7d 3a 20 50 41  testscp_tag}: PA
3db0: 53 53 22 20 3e 3e 20 20 22 24 7b 74 65 73 74 72  SS" >>  "${testr
3dc0: 65 73 75 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09 09  esultslog}".....
3dd0: 72 6d 20 2d 66 20 22 24 7b 73 63 70 6c 6f 67 66  rm -f "${scplogf
3de0: 69 6c 65 7d 22 0a 09 09 64 6f 6e 65 0a 0a 09 09  ile}"...done....
3df0: 69 66 20 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75  if [ -f "${outpu
3e00: 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22  tname}-origname"
3e10: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 72 6d 20 2d   ]; then....rm -
3e20: 66 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  f "${createdkit}
3e30: 22 0a 09 09 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e  "...fi..done.don
3e40: 65 0a 0a 69 66 20 5b 20 2d 6e 20 22 24 7b 66 61  e..if [ -n "${fa
3e50: 69 6c 65 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  iled}" ]; then..
3e60: 65 63 68 6f 20 22 46 61 69 6c 65 64 3a 20 24 7b  echo "Failed: ${
3e70: 66 61 69 6c 65 64 7d 22 0a 66 69 0a 0a 23 20 43  failed}".fi..# C
3e80: 6c 65 61 6e 75 70 0a 23 23 20 54 65 72 6d 69 6e  leanup.## Termin
3e90: 61 74 65 20 58 76 66 62 0a 6b 69 6c 6c 20 2d 39  ate Xvfb.kill -9
3ea0: 20 22 24 7b 58 56 46 42 5f 50 49 44 7d 22 0a 0a   "${XVFB_PID}"..
3eb0: 23 23 20 52 65 6d 6f 76 65 20 77 69 6e 65 0a 72  ## Remove wine.r
3ec0: 6d 20 2d 72 66 20 22 24 7b 57 49 4e 45 50 52 45  m -rf "${WINEPRE
3ed0: 46 49 58 33 32 7d 22 20 22 24 7b 57 49 4e 45 50  FIX32}" "${WINEP
3ee0: 52 45 46 49 58 36 34 7d 22 0a 0a 2e 2f 6b 69 74  REFIX64}".../kit
3ef0: 63 72 65 61 74 6f 72 20 63 6c 65 61 6e 0a 72 6d  creator clean.rm
3f00: 20 2d 66 20 74 63 6c 73 68 0a                     -f tclsh.