9cecf15650b5e5d1bab7ad273a0e4d81fe666a35
[git/cygwin-packages/biber.git] / prereqs00_do_twice / build.sh
1 #! /bin/bash
2
3 # Run in elevated shell as kbrown-admin.
4
5 SYSARCH=$(uname -m)
6 if [ ${SYSARCH} = i686 ]
7 then
8 GENINI="GEN-ini"
9 DEST_ARCH="x86"
10 else
11 GENINI="GEN-ini64"
12 DEST_ARCH="x86_64"
13 fi
14
15 setup="/c/downloads/cygwin/${DEST_ARCH}.exe"
16
17 GENINI() {
18 mksetupini --arch=${DEST_ARCH} --release=kbrown --inifile=${DEST_ARCH}/setup.ini \
19 --okmissing=required-package --okmissing=curr --releasearea .
20 cd ${DEST_ARCH}
21 xz -c setup.ini > setup.xz
22 chown kbrown setup.ini setup.xz
23 cd ..
24 }
25
26 install() {
27 pushd /c/downloads/cygwin/myrepo
28 GENINI
29 popd
30 ${setup} -M -X -L -P $1
31 }
32
33 mods="
34 perl-Archive-Zip
35 perl-YAML-LibYAML
36 perl-Module-Build
37 perl-PAR-Dist
38 perl-SUPER
39 perl-Sub-Identify
40 perl-inc-latest
41 perl-Test-MockModule
42 perl-List-MoreUtils
43 perl-Exporter-Tiny
44 perl-List-MoreUtils-XS
45 "
46
47 rm -f build_failures.txt test_failures.txt
48 touch build_failures.txt test_failures.txt
49 chown kbrown build_failures.txt test_failures.txt
50
51 export cygport_no_error=1
52
53 for m in ${mods}
54 do
55 eval $(grep '^NAME=' ${m}/${m}.cygport)
56 eval $(grep '^VERSION=' ${m}/${m}.cygport)
57 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
58 PVR=${NAME}-${VERSION}-${RELEASE}
59 if [ ${RELEASE} = 1 ]
60 then
61 RELEASE=2
62 PVR=${NAME}-${VERSION}-2
63 sed -i -e 's/^RELEASE=.*/RELEASE=2/' ${m}/${m}.cygport
64 fi
65 ARCH=${SYSARCH}
66 eval $(grep '^ARCH=' ${m}/${m}.cygport)
67 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
68 then
69 echo "Entering ${m}..."
70 cd ${m} || exit 1
71 echo "Running cygport..."
72 rm -rf ${PVR}.${ARCH}
73 if cygport ${m}.cygport fetch all
74 then
75 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
76 if [ ${ARCH} = noarch ]
77 then
78 dest=/c/downloads/cygwin/myrepo/noarch/release/
79 else
80 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
81 fi
82 chown -R kbrown .
83 rm -rf ${dest}/${m}
84 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
85 install ${m}
86 else
87 echo ${m} >> ../build_failures.txt
88 chown -R kbrown .
89 fi
90 echo "Leaving ${m}."
91 cd ..
92 else
93 install ${m}
94 fi
95 done
This page took 0.034535 seconds and 4 git commands to generate.