+function myhelp
+{
+ echo "Usage: $0 [-v|--verbose] [-a|--all] [-t|--target vendor/board] [lbroot]"
+ echo " $0 [-V|--version]"
+ echo " $0 [-h|--help]"
+ exit 0
+}
+
+function myversion
+{
+ cat << EOF
+
+LinuxBIOS autobuild: V0.1.
+
+Copyright (C) 2004 by Stefan Reinauer, <stepan@openbios.org>
+This program is free software; you may redistribute it under the terms
+of the GNU General Public License. This program has absolutely no
+warranty.
+
+EOF
+ myhelp
+ exit 0
+}
+
+# default options
+target=""
+buildall=false
+
+# parse parameters
+args=`getopt -l version,verbose,help,all,target: Vvhat: $*`
+
+if [ $? != 0 ]; then
+ myhelp
+ exit 1
+fi
+
+set -- $args
+for arg
+do
+ case $arg in
+ -t|--target) shift;target=$1;shift;;
+ -a|--all) shift;buildall=true;;
+ -v|--verbose) shift;verbose=true;;
+ -V|--version) shift;myversion;;
+ -h|--help) shift;myhelp;;
+ esac
+done
+
+# -- is $1
+LBROOT=$2
+
+# /path/to/freebios2/
+if [ -z "$LBROOT" ] ; then
+ LBROOT=$( cd ../..; pwd )
+fi
+
+if [ $target != "" ]; then
+ # build a single board
+ VENDOR=`echo $target|tr -d \'|cut -f1 -d/`
+ MAINBOARD=`echo $target|tr -d \'|cut -f2 -d/`
+ build_target $VENDOR $MAINBOARD
+else
+ # build all boards per default
+ for VENDOR in $( vendors ); do
+ for MAINBOARD in $( mainboards $VENDOR ); do