root/current/emdebian/trunk/buildcross/branch/buildcross
| Revision 3272, 3.1 kB (checked in by zumbi, 9 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #!/bin/sh |
| 2 | # $Header: /var/emdebian/svn/tools/buildcross/branch/buildcross,v 0.3 2007/07/18 01:10:03 zumbi Exp $ |
| 3 | # |
| 4 | # Copyright (C) 2000, 2007, 2008 Emdebian <debian-embedded@lists.debian.org> |
| 5 | # |
| 6 | # This program should call buildcross to build a certain outdated |
| 7 | # package. It runs buildcross in a modular way. This program should |
| 8 | # check if there is a need of building a certain package. |
| 9 | # |
| 10 | # PSEUDO CODE: |
| 11 | # For all arches do |
| 12 | # Check new version |
| 13 | # Compare to latest built version |
| 14 | # If new version available |
| 15 | # Perform a buildcross call |
| 16 | # Wait |
| 17 | # Check log |
| 18 | # Report Status to webpage |
| 19 | # Else |
| 20 | # Report status |
| 21 | # fi |
| 22 | # Done |
| 23 | # |
| 24 | # This program is free software; you can redistribute it and/or modify |
| 25 | # it under the terms of the GNU General Public License as published by |
| 26 | # the Free Software Foundation; either version 2 of the License, or |
| 27 | # (at your option) any later version. |
| 28 | # |
| 29 | # This program is distributed in the hope that it will be useful, |
| 30 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 31 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 32 | # GNU General Public License for more details. |
| 33 | # |
| 34 | # You should have received a copy of the GNU General Public License |
| 35 | # along with this program; if not, write to the Free Software |
| 36 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 37 | # |
| 38 | # |
| 39 | # Distributed under the terms of the GNU General Public License v2 or, at your opinion, any later version. |
| 40 | |
| 41 | source conf_vars.sh |
| 42 | |
| 43 | print_help=0 |
| 44 | print_version=0 |
| 45 | do_quiet=0 |
| 46 | do_background=0 |
| 47 | ME=`echo $0 | sed -e 's/.*\///'` |
| 48 | |
| 49 | while [ -n "$1" ]; do |
| 50 | case $1 in |
| 51 | -v) |
| 52 | print_version=1 |
| 53 | shift |
| 54 | ;; |
| 55 | -b) |
| 56 | do_background=1 |
| 57 | shift |
| 58 | ;; |
| 59 | -c) |
| 60 | do_quiet=1 |
| 61 | shift |
| 62 | ;; |
| 63 | -d) |
| 64 | # normal mode |
| 65 | shift |
| 66 | ;; |
| 67 | *) |
| 68 | print_help=1 |
| 69 | shift |
| 70 | ;; |
| 71 | esac |
| 72 | done |
| 73 | if [ $print_help -eq 1 ]; then |
| 74 | echo "Usage: $ME [OPTION]" |
| 75 | echo "Build Debian cross toolchain system." |
| 76 | cat <<-EOF |
| 77 | |
| 78 | -h display this help |
| 79 | -v display version number |
| 80 | -b no output, runs completely in the background |
| 81 | WARNING: You can not stop it, just using kill. |
| 82 | If you are in a chroot make sure proc is mounted. |
| 83 | -c Be quiet, no output |
| 84 | -d Show output. Recommended for first time. This is the default. |
| 85 | |
| 86 | Check log.html file (bug: libs always is marked as failed) |
| 87 | All log info is under logs/ |
| 88 | build.log buildcross log |
| 89 | 1-2-3.log package log |
| 90 | 1: host arch |
| 91 | 2: target arch |
| 92 | 3: package built |
| 93 | |
| 94 | EOF |
| 95 | exit 0 |
| 96 | elif [ $print_version -eq 1 ]; then |
| 97 | echo "@VERSION@" |
| 98 | exit 0 |
| 99 | fi |
| 100 | |
| 101 | if [ ! -d $LOGPATH ]; then |
| 102 | mkdir -p $LOGPATH |
| 103 | fi |
| 104 | |
| 105 | if [ $do_background -ne 0 ]; then |
| 106 | echo "Running in the background." |
| 107 | echo "Check file.html when time is displayed" |
| 108 | time ./em_wrap.sh &> $LOGPATH/build.log & |
| 109 | elif [ $do_quiet -ne 0 ]; then |
| 110 | time ./em_wrap.sh 2>&1 >& $LOGPATH/build.log |
| 111 | exit $? |
| 112 | else |
| 113 | time ./em_wrap.sh 2>&1 >&1 | tee $LOGPATH/build.log |
| 114 | exit $? |
| 115 | fi |
Note: See TracBrowser
for help on using the browser.
