5 Usage: id-pbuild-root.sh [OPTIONS]
18 while test $# -gt 0; do
20 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
42 if test "$do_help" = "yes"; then
45 if test -z "$DIST"; then
46 echo "id-pbuild-root.sh: missing --dist"
49 if test -z "$ARCH"; then
50 echo "id-pbuild-root.sh: missing --arch"
53 if test -z "$DSC"; then
54 echo "id-pbuild-root.sh: missing --dsc"
57 if test ! -x /usr/bin/lxc-attach; then
58 echo "No lxc-attach. Probably not running on mochi!!"
61 export DIST ARCH # export for pbuilder to see
62 echo "$DIST-$ARCH begin"
64 if ! lxc-attach -n pbuilder -- pbuilder --update --override-config >update-${DIST}-${ARCH}.log 2>&1; then
65 if ! lxc-attach -n pbuilder -- pbuilder --create >create-${DIST}-${ARCH}.log 2>&1; then
66 echo "$DIST-$ARCH failed. Inspect deb-src/create-${DIST}-${ARCH}.log"
69 if ! lxc-attach -n pbuilder -- pbuilder --update --override-config >update-${DIST}-${ARCH}.log 2>&1; then
70 echo "$DIST-$ARCH failed. Inspect deb-src/update-${DIST}-${ARCH}.log"
75 if ! lxc-attach -n pbuilder -- pbuilder --build $DSC >build-${DIST}-${ARCH}.log 2>&1; then
76 echo "$DIST-$ARCH failed. Inspect deb-src/build-${DIST}-${ARCH}.log"
79 echo "$DIST-$ARCH done"