Update for perl-5.26.0
[git/cygwin-packages/biber.git] / prereqs01 / 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 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
41 mods="
42 perl-ExtUtils-Config
43 perl-Mojolicious
44 perl-Try-Tiny
45 perl-File-Remove
46 perl-YAML-Tiny
47 "
48
49 rm -f build_failures.txt test_failures.txt
50 touch build_failures.txt test_failures.txt
51 chown kbrown build_failures.txt test_failures.txt
52
53 export cygport_no_error=1
54
55 for m in ${mods}
56 do
57 eval $(grep '^NAME=' ${m}/${m}.cygport)
58 eval $(grep '^VERSION=' ${m}/${m}.cygport)
59 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
60 PVR=${NAME}-${VERSION}-${RELEASE}
61 ARCH=${SYSARCH}
62 eval $(grep '^ARCH=' ${m}/${m}.cygport)
63 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
64 then
65 echo "Entering ${m}..."
66 cd ${m} || exit 1
67 echo "Running cygport..."
68 rm -rf ${PVR}.${ARCH}
69 if cygport ${m}.cygport fetch all
70 then
71 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
72 if [ ${ARCH} = noarch ]
73 then
74 dest=/c/downloads/cygwin/myrepo/noarch/release/
75 else
76 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
77 fi
78 chown -R kbrown .
79 rm -rf ${dest}/${m}
80 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
81 else
82 echo ${m} >> ../build_failures.txt
83 chown -R kbrown .
84 fi
85 echo "Leaving ${m}."
86 cd ..
87 fi
88 done
89 install
90 if [ -n "$(cat *.txt)" ]
91 then
92 echo There were failures.
93 exit 1
94 else
95 exit 0
96 fi
97
This page took 0.036206 seconds and 5 git commands to generate.