9066ff7176417333021fa21786507640fabe90fe
[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 "
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 ARCH=${SYSARCH}
60 eval $(grep '^ARCH=' ${m}/${m}.cygport)
61 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
62 then
63 echo "Entering ${m}..."
64 cd ${m} || exit 1
65 echo "Running cygport..."
66 rm -rf ${PVR}.${ARCH}
67 if cygport ${m}.cygport fetch all
68 then
69 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
70 if [ ${ARCH} = noarch ]
71 then
72 dest=/c/downloads/cygwin/myrepo/noarch/release/
73 else
74 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
75 fi
76 chown -R kbrown .
77 rm -rf ${dest}/${m}
78 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
79 else
80 echo ${m} >> ../build_failures.txt
81 chown -R kbrown .
82 fi
83 echo "Leaving ${m}."
84 cd ..
85 fi
86 done
87 install
88 if [ -n "$(cat *.txt)" ]
89 then
90 echo There were failures.
91 exit 1
92 else
93 exit 0
94 fi
95
This page took 0.036872 seconds and 4 git commands to generate.