#!/bin/bash # $Header: /var/emdebian/svn/tools/buildcross/branch/buildcross,v 0.3 2007/07/18 01:10:03 zumbi Exp $ # # Copyright (C) 2000, 2007 Emdebian # # This program should call buildcross to build a certain outdated # package. It runs buildcross in a modular way. This program should # check if there is a need of building a certain package. # # PSEUDO CODE: # For all arches do # Check new version # Compare to latest built version # If new version available # Perform a buildcross call # Wait # Check log # Report Status to webpage # Else # Report status # fi # Done # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Distributed under the terms of the GNU General Public License v2 source conf_vars.sh if [ ! -d $LOGPATH ]; then mkdir -p $LOGPATH fi usage(){ echo "Usage: ${0##*/} [OPTION]" echo "Build Debian cross toolchain system." echo cat << EOF -h displays this help -v displays version number -b no output, runs completely on background WARNING: You can not stop it, just using kill. If you are in a chroot beware proc is mounted. -c no output mode -d Show output. Recommended for first time. Check log.html file (bug: libs always is marked as failed) All log info is under logs/ build.log buildcross log 1-2-3.log package log 1: host arch 2: target arch 3: package built EOF } if [ $# != 0 ]; then while true; do case $1 in -h) usage exit 0 ;; -v) echo "Version: 0.2-v" shift ;; -b) echo "Buildcross has no output with -b option, so it runs on background." echo "Check file.html when time is displayed" # time ./em_wrap.sh &> $LOGPATH/build.log & shift ;; -c) # time ./em_wrap.sh &> $LOGPATH/build.log echo "Version: 0.2-c" shift ;; -d) # time ./em_wrap.sh | tee $LOGPATH/build.log echo "Version: 0.2-d" shift ;; *) break ;; esac done fi