Megatest

Hex Artifact Content
Login

Artifact 2992cfb0b8d4b239e49ea815b32d785a779ca1b3:


0000: 23 21 2f 62 69 6e 2f 62 61 73 68 0a 0a 23 20 20  #!/bin/bash..#  
0010: 43 6f 70 79 72 69 67 68 74 20 32 30 30 36 2d 32  Copyright 2006-2
0020: 30 31 37 2c 20 4d 61 74 74 68 65 77 20 57 65 6c  017, Matthew Wel
0030: 6c 61 6e 64 2e 0a 23 20 0a 23 20 54 68 69 73 20  land..# .# This 
0040: 66 69 6c 65 20 69 73 20 70 61 72 74 20 6f 66 20  file is part of 
0050: 4d 65 67 61 74 65 73 74 2e 0a 23 20 0a 23 20 20  Megatest..# .#  
0060: 20 20 20 4d 65 67 61 74 65 73 74 20 69 73 20 66     Megatest is f
0070: 72 65 65 20 73 6f 66 74 77 61 72 65 3a 20 79 6f  ree software: yo
0080: 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62 75  u can redistribu
0090: 74 65 20 69 74 20 61 6e 64 2f 6f 72 20 6d 6f 64  te it and/or mod
00a0: 69 66 79 0a 23 20 20 20 20 20 69 74 20 75 6e 64  ify.#     it und
00b0: 65 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20  er the terms of 
00c0: 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20  the GNU General 
00d0: 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 61  Public License a
00e0: 73 20 70 75 62 6c 69 73 68 65 64 20 62 79 0a 23  s published by.#
00f0: 20 20 20 20 20 74 68 65 20 46 72 65 65 20 53 6f       the Free So
0100: 66 74 77 61 72 65 20 46 6f 75 6e 64 61 74 69 6f  ftware Foundatio
0110: 6e 2c 20 65 69 74 68 65 72 20 76 65 72 73 69 6f  n, either versio
0120: 6e 20 33 20 6f 66 20 74 68 65 20 4c 69 63 65 6e  n 3 of the Licen
0130: 73 65 2c 20 6f 72 0a 23 20 20 20 20 20 28 61 74  se, or.#     (at
0140: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 29 20 61 6e   your option) an
0150: 79 20 6c 61 74 65 72 20 76 65 72 73 69 6f 6e 2e  y later version.
0160: 0a 23 20 0a 23 20 20 20 20 20 4d 65 67 61 74 65  .# .#     Megate
0170: 73 74 20 69 73 20 64 69 73 74 72 69 62 75 74 65  st is distribute
0180: 64 20 69 6e 20 74 68 65 20 68 6f 70 65 20 74 68  d in the hope th
0190: 61 74 20 69 74 20 77 69 6c 6c 20 62 65 20 75 73  at it will be us
01a0: 65 66 75 6c 2c 0a 23 20 20 20 20 20 62 75 74 20  eful,.#     but 
01b0: 57 49 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52  WITHOUT ANY WARR
01c0: 41 4e 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76  ANTY; without ev
01d0: 65 6e 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77  en the implied w
01e0: 61 72 72 61 6e 74 79 20 6f 66 0a 23 20 20 20 20  arranty of.#    
01f0: 20 4d 45 52 43 48 41 4e 54 41 42 49 4c 49 54 59   MERCHANTABILITY
0200: 20 6f 72 20 46 49 54 4e 45 53 53 20 46 4f 52 20   or FITNESS FOR 
0210: 41 20 50 41 52 54 49 43 55 4c 41 52 20 50 55 52  A PARTICULAR PUR
0220: 50 4f 53 45 2e 20 20 53 65 65 20 74 68 65 0a 23  POSE.  See the.#
0230: 20 20 20 20 20 47 4e 55 20 47 65 6e 65 72 61 6c       GNU General
0240: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20   Public License 
0250: 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73  for more details
0260: 2e 0a 23 20 0a 23 20 20 20 20 20 59 6f 75 20 73  ..# .#     You s
0270: 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 69  hould have recei
0280: 76 65 64 20 61 20 63 6f 70 79 20 6f 66 20 74 68  ved a copy of th
0290: 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75  e GNU General Pu
02a0: 62 6c 69 63 20 4c 69 63 65 6e 73 65 0a 23 20 20  blic License.#  
02b0: 20 20 20 61 6c 6f 6e 67 20 77 69 74 68 20 4d 65     along with Me
02c0: 67 61 74 65 73 74 2e 20 20 49 66 20 6e 6f 74 2c  gatest.  If not,
02d0: 20 73 65 65 20 3c 68 74 74 70 3a 2f 2f 77 77 77   see <http://www
02e0: 2e 67 6e 75 2e 6f 72 67 2f 6c 69 63 65 6e 73 65  .gnu.org/license
02f0: 73 2f 3e 2e 0a 0a 6d 79 68 6f 6d 65 3d 24 28 64  s/>...myhome=$(d
0300: 69 72 6e 61 6d 65 20 24 30 29 0a 0a 69 66 20 5b  irname $0)..if [
0310: 5b 20 24 70 72 6f 78 79 20 3d 3d 20 22 22 20 5d  [ $proxy == "" ]
0320: 5d 3b 20 74 68 65 6e 20 0a 20 20 65 63 68 6f 20  ]; then .  echo 
0330: 27 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20  'Please set the 
0340: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
0350: 61 62 6c 65 20 22 70 72 6f 78 79 22 20 74 6f 20  able "proxy" to 
0360: 68 6f 73 74 2e 63 6f 6d 3a 70 6f 72 74 20 28 65  host.com:port (e
0370: 2e 67 2e 20 66 6f 6f 2e 63 6f 6d 3a 31 32 33 34  .g. foo.com:1234
0380: 29 20 74 6f 20 75 73 65 20 61 20 70 72 6f 78 79  ) to use a proxy
0390: 27 0a 20 20 65 63 68 6f 20 50 52 4f 58 3d 22 22  '.  echo PROX=""
03a0: 0a 65 6c 73 65 0a 20 20 65 78 70 6f 72 74 20 68  .else.  export h
03b0: 74 74 70 5f 70 72 6f 78 79 3d 68 74 74 70 3a 2f  ttp_proxy=http:/
03c0: 2f 24 70 72 6f 78 79 0a 20 20 65 78 70 6f 72 74  /$proxy.  export
03d0: 20 50 52 4f 58 3d 22 2d 70 72 6f 78 79 20 24 70   PROX="-proxy $p
03e0: 72 6f 78 79 22 0a 66 69 0a 0a 69 66 20 5b 5b 20  roxy".fi..if [[ 
03f0: 2d 7a 20 24 50 52 45 46 49 58 20 5d 5d 3b 74 68  -z $PREFIX ]];th
0400: 65 6e 0a 20 20 65 63 68 6f 20 22 5c 24 50 52 45  en.  echo "\$PRE
0410: 46 49 58 20 76 61 72 69 61 62 6c 65 20 69 73 20  FIX variable is 
0420: 72 65 71 75 69 72 65 64 22 0a 20 20 65 78 69 74  required".  exit
0430: 0a 66 69 0a 0a 65 78 70 6f 72 74 20 4c 44 5f 4c  .fi..export LD_L
0440: 49 42 52 41 52 59 5f 4e 41 4d 45 3d 24 50 52 45  IBRARY_NAME=$PRE
0450: 46 49 58 2f 6c 69 62 0a 0a 6c 6f 67 6e 61 6d 65  FIX/lib..logname
0460: 3d 24 28 62 61 73 65 6e 61 6d 65 20 24 50 52 45  =$(basename $PRE
0470: 46 49 58 29 0a 0a 73 63 72 69 70 74 20 2d 63 20  FIX)..script -c 
0480: 22 6d 61 6b 65 20 2d 66 20 24 6d 79 68 6f 6d 65  "make -f $myhome
0490: 2f 4d 61 6b 65 66 69 6c 65 5f 6c 61 74 65 73 74  /Makefile_latest
04a0: 2e 69 6e 73 74 61 6c 6c 61 6c 6c 20 61 6c 6c 22  .installall all"
04b0: 20 24 6c 6f 67 6e 61 6d 65 2e 6c 6f 67 0a         $logname.log.