Continue WIP
[git/cygwin-packages/biber.git] / prereqs02 / 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-Helpers
43 perl-ExtUtils-InstallPaths
44 perl-Importer
45 perl-Module-Runtime
46 perl-Test-Fatal
47 perl-Test-Requires
48 perl-Test-Simple
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 else
84 echo ${m} >> ../build_failures.txt
85 chown -R kbrown .
86 fi
87 echo "Leaving ${m}."
88 cd ..
89 fi
90 done
91 install
92 if [ -n "$(cat *.txt)" ]
93 then
94 echo There were failures.
95 exit 1
96 else
97 exit 0
98 fi
99
This page took 0.036062 seconds and 5 git commands to generate.