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