#!/bin/bash # # Copyright (C) 2010 Hector Oron Martinez # # 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. # . /etc/buildcross.conf . /usr/share/buildcross/functions 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 --init start the build --clean clean dirs and remove cross binary files Be sure you edit /etc/buildcross.conf to set your build. Check log.html file (bug: libs always is marked as failed) All log info is under logs/ build.log buildcross log --.log package log EOF } case $1 in -h) usage exit 0 ;; -v) echo "Version: 0.0.1" ;; --init) echo "Build starts" mkdir -p $LOGPATH if [ x"$FORCE_UPGRADE" = xyes ] ; then update_sys fi time em_wrap | tee $LOGPATH/build.log ;; --clean) echo "Cleaning dirs and removing cross binaries" em_clean ;; *) usage exit 0 ;; esac