Finish (?) build of biber prereqs
[git/cygwin-packages/biber.git] / prereqs10 / build.sh
CommitLineData
37cfe0b3
KB
1#! /bin/bash
2
3# Run in elevated shell as kbrown-admin.
4# Copy setup-*.exe to *.exe to avoid prompt.
5
6SYSARCH=$(uname -m)
7if [ ${SYSARCH} = i686 ]
8then
9 GENINI="GEN-ini"
10 DEST_ARCH="x86"
11else
12 GENINI="GEN-ini64"
13 DEST_ARCH="x86_64"
14fi
15
16setup="/c/downloads/cygwin/${DEST_ARCH}.exe"
17
18GENINI() {
19 mksetupini --arch=${DEST_ARCH} --release=kbrown --inifile=${DEST_ARCH}/setup.ini \
20 --okmissing=required-package --okmissing=curr --releasearea .
21cd ${DEST_ARCH}
22xz -c setup.ini > setup.xz
23chown kbrown setup.ini setup.xz
24cd ..
25}
26
27install() {
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
41mods="
42perl-Business-ISBN
43perl-Business-ISMN
44perl-Business-ISSN
45perl-Class-Accessor
46perl-Data-Compare
47perl-Data-Dump
48perl-Data-Uniqid
49perl-DateTime-Calendar-Julian
50perl-DateTime-Format-Builder
51perl-Encode-JIS2K
52perl-File-Slurp
53perl-File-Which
54perl-LWP-Protocol-https
55perl-Lingua-Translit
56perl-List-AllUtils
57perl-Log-Log4perl
58perl-Regexp-Common
59perl-Sort-Key
60perl-Test-Differences
61perl-Text-BibTeX
62perl-Text-CSV
a1d1685c 63perl-Text-CSV_XS
37cfe0b3
KB
64perl-Text-Roman
65perl-Unicode-Collate
66perl-Unicode-LineBreak
67perl-XML-LibXML-Simple
68perl-XML-LibXSLT
69perl-XML-Writer
70perl-autovivification
71"
72
73rm -f build_failures.txt test_failures.txt
74touch build_failures.txt test_failures.txt
75chown kbrown build_failures.txt test_failures.txt
76
77export cygport_no_error=1
78
79for m in ${mods}
80do
81 eval $(grep '^NAME=' ${m}/${m}.cygport)
82 eval $(grep '^VERSION=' ${m}/${m}.cygport)
83 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
84 PVR=${NAME}-${VERSION}-${RELEASE}
85 ARCH=${SYSARCH}
86 eval $(grep '^ARCH=' ${m}/${m}.cygport)
87 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
88 then
89 echo "Entering ${m}..."
90 cd ${m} || exit 1
91 echo "Running cygport..."
92 rm -rf ${PVR}.${ARCH}
93 if cygport ${m}.cygport fetch all
94 then
95 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
96 if [ ${ARCH} = noarch ]
97 then
98 dest=/c/downloads/cygwin/myrepo/noarch/release/
99 else
100 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
101 fi
102 chown -R kbrown .
103 rm -rf ${dest}/${m}
104 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
105 else
106 echo ${m} >> ../build_failures.txt
107 chown -R kbrown .
108 fi
109 echo "Leaving ${m}."
110 cd ..
111 fi
112done
113install
114if [ -n "$(cat *.txt)" ]
115then
116 echo There were failures.
117 exit 1
118else
119 exit 0
120fi
121
This page took 0.027811 seconds and 5 git commands to generate.