Continue WIP
[git/cygwin-packages/biber.git] / prereqs08 / build.sh
1 #! /bin/bash
2
3 # Run in elevated shell as kbrown-admin.
4 # Copy setup-*.exe to *.exe to avoid prompt.
5
6 SYSARCH=$(uname -m)
7 if [ ${SYSARCH} = i686 ]
8 then
9 GENINI="GEN-ini"
10 DEST_ARCH="x86"
11 else
12 GENINI="GEN-ini64"
13 DEST_ARCH="x86_64"
14 fi
15
16 setup="/c/downloads/cygwin/${DEST_ARCH}.exe"
17
18 GENINI() {
19 mksetupini --arch=${DEST_ARCH} --release=kbrown --inifile=${DEST_ARCH}/setup.ini \
20 --okmissing=required-package --okmissing=curr --releasearea .
21 cd ${DEST_ARCH}
22 xz -c setup.ini > setup.xz
23 chown kbrown setup.ini setup.xz
24 cd ..
25 }
26
27 install() {
28 local command
29 pushd /c/downloads/cygwin/myrepo
30 GENINI
31 popd
32 command="${setup} -q -X -L"
33 for m in ${mods}
34 do
35 command+=" -P ${m}"
36 done
37 echo "Running ${command}"
38 ${command}
39 }
40
41 mods="
42 perl-Algorithm-Diff
43 perl-Capture-Tiny
44 perl-DateTime
45 perl-Encode-EUCJPASCII
46 perl-Encode-HanExtra
47 perl-Encode-JISX0213
48 perl-File-Listing
49 perl-HTML-Parser
50 perl-HTTP-Cookies
51 perl-HTTP-Daemon
52 perl-HTTP-Negotiate
53 perl-List-SomeUtils-XS
54 perl-Net-HTTP
55 perl-Net-SSLeay
56 perl-POD2-Base
57 perl-Package-DeprecationManager
58 perl-Readonly
59 perl-Test-LeakTrace
60 perl-Test-RequiresInternet
61 perl-Test-TrailingSpace
62 perl-WWW-RobotRules
63 perl-XML-SAX
64 "
65
66 rm -f build_failures.txt test_failures.txt
67 touch build_failures.txt test_failures.txt
68 chown kbrown build_failures.txt test_failures.txt
69
70 export cygport_no_error=1
71
72 for m in ${mods}
73 do
74 eval $(grep '^NAME=' ${m}/${m}.cygport)
75 eval $(grep '^VERSION=' ${m}/${m}.cygport)
76 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
77 PVR=${NAME}-${VERSION}-${RELEASE}
78 ARCH=${SYSARCH}
79 eval $(grep '^ARCH=' ${m}/${m}.cygport)
80 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
81 then
82 echo "Entering ${m}..."
83 cd ${m} || exit 1
84 echo "Running cygport..."
85 rm -rf ${PVR}.${ARCH}
86 if cygport ${m}.cygport fetch all
87 then
88 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
89 if [ ${ARCH} = noarch ]
90 then
91 dest=/c/downloads/cygwin/myrepo/noarch/release/
92 else
93 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
94 fi
95 chown -R kbrown .
96 rm -rf ${dest}/${m}
97 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
98 else
99 echo ${m} >> ../build_failures.txt
100 chown -R kbrown .
101 fi
102 echo "Leaving ${m}."
103 cd ..
104 fi
105 done
106 install
107 if [ -n "$(cat *.txt)" ]
108 then
109 echo There were failures.
110 exit 1
111 else
112 exit 0
113 fi
114
This page took 0.036167 seconds and 5 git commands to generate.