8baa55c8ee93b114e75153033f5f7662ed321ec2
[git/cygwin-packages/biber.git] / prereqs00_do_twice / 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 pushd /c/downloads/cygwin/myrepo
29 GENINI
30 popd
31 ${setup} -q -X -L -P $1
32 # Need -M on second run so can reinstall.
33 # ${setup} -M -X -L
34 }
35
36 mods="
37 perl-Archive-Zip
38 perl-YAML-LibYAML
39 perl-Module-Build
40 perl-PAR-Dist
41 perl-SUPER
42 perl-Sub-Identify
43 perl-inc-latest
44 perl-Test-MockModule
45 perl-List-MoreUtils
46 perl-Exporter-Tiny
47 perl-List-MoreUtils-XS
48 "
49
50 rm -f build_failures.txt test_failures.txt
51 touch build_failures.txt test_failures.txt
52 chown kbrown build_failures.txt test_failures.txt
53
54 export cygport_no_error=1
55
56 for m in ${mods}
57 do
58 eval $(grep '^NAME=' ${m}/${m}.cygport)
59 eval $(grep '^VERSION=' ${m}/${m}.cygport)
60 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
61 PVR=${NAME}-${VERSION}-${RELEASE}
62 ARCH=${SYSARCH}
63 eval $(grep '^ARCH=' ${m}/${m}.cygport)
64 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
65 then
66 echo "Entering ${m}..."
67 cd ${m} || exit 1
68 echo "Running cygport..."
69 rm -rf ${PVR}.${ARCH}
70 if cygport ${m}.cygport fetch all
71 then
72 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
73 if [ ${ARCH} = noarch ]
74 then
75 dest=/c/downloads/cygwin/myrepo/noarch/release/
76 else
77 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
78 fi
79 chown -R kbrown .
80 rm -rf ${dest}/${m}
81 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
82 install ${m}
83 else
84 echo ${m} >> ../build_failures.txt
85 chown -R kbrown .
86 fi
87 echo "Leaving ${m}."
88 cd ..
89 else
90 install ${m}
91 fi
92 done
This page took 0.033216 seconds and 4 git commands to generate.