Continue WIP
[git/cygwin-packages/biber.git] / prereqs00_do_twice / build.sh
CommitLineData
d4293f97
KB
1#! /bin/bash
2
3# Run in elevated shell as kbrown-admin.
30aaa56e 4# Copy setup-*.exe to *.exe to avoid prompt.
d4293f97
KB
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 pushd /c/downloads/cygwin/myrepo
29 GENINI
30 popd
30aaa56e
KB
31 # ${setup} -q -X -L -P $1
32 # Need -M on second run so can reinstall.
33 ${setup} -M -X -L
d4293f97
KB
34}
35
36mods="
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
50rm -f build_failures.txt test_failures.txt
51touch build_failures.txt test_failures.txt
52chown kbrown build_failures.txt test_failures.txt
53
54export cygport_no_error=1
55
56for m in ${mods}
57do
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}
d4293f97
KB
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
92done
This page took 0.030313 seconds and 5 git commands to generate.