]> git.pld-linux.org Git - projects/cleanbuild.git/blame - multibuild
- create user in chroot with proper UID (same as in host system)
[projects/cleanbuild.git] / multibuild
CommitLineData
594c2998 1#!/bin/sh
2
3[ -d mbuild ] || mkdir mbuild
4
5end_pkg()
6{
7 result=fail
8 [ $ret -eq 0 ] && result=ok
9 mv mbuild/start.$package mbuild/$result.$package
10}
11
12next_pkg()
13{
14 package=""
15 while read pkg; do
16 if [ ! -r mbuild/ok.$pkg ] && [ ! -r mbuild/fail.$pkg ] \
17 && [ ! -r mbuild/start.$pkg ]; then
18 package="$pkg"
19 touch mbuild/start.$package
20 break
21 fi
22 done < blist
23
24 if [ -z "$package" ]; then
25 echo "Nothing to build"
26 exit
27 fi
28}
29
30./clean "$@"
31package=
32next_pkg
33build="cleanbuild"
34
35b="$(echo -n -e '\033[1m')"
36B="$(echo -n -e '\033[22m')"
37c="$(echo -n -e '\033[33m')"
38e="$(echo -n -e '\033[0m')"
39while true; do
40 ./$build "$@" $package
41 ret=$?
42
43 echo "$package build finished with exit status $ret"
44 echo
45
46 while true; do
47 if [ $ret -eq 0 ]; then
48 echo -n "${b}c${B}lean rebuild," \
49 "re${b}b${B}uild, $c${b}n${B}ext$e ? "
50 else
51 echo -n "${b}c${B}lean rebuild," \
52 "${c}re${b}b${B}uild$e, ${b}n${B}ext ? "
53 fi
54
55 read ans
56 case "x$ans" in
57 x[rRcC])
58 build="cleanbuild"
59 ;;
60 x[bB])
61 build="build"
62 ;;
63 x[nN])
64 end_pkg
65 build="cleanbuild"
66 ./clean "$@"
67 next_pkg
68 ;;
69 x[qQ])
70 end_pkg
71 exit
72 ;;
73 x)
74 if [ $ret -eq 0 ]; then
75 end_pkg
76 build="cleanbuild"
77 ./clean "$@"
78 next_pkg
79 else
80 build="build"
81 fi
82 ;;
83 *)
84 continue
85 ;;
86 esac
87
88 break
89 done
90
91
92done
93
94# vim: ts=4:sw=4
This page took 0.034065 seconds and 4 git commands to generate.