From f5f01b84c82cca3c6941c441fe576af6045ea77b Mon Sep 17 00:00:00 2001 From: Thomas Lundström Date: Mon, 25 Jul 2016 14:34:39 +0200 Subject: Removed the doc directory. The documentation is now located in the release repo. --- doc/initbuildboot.sh | 111 --------------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 doc/initbuildboot.sh (limited to 'doc/initbuildboot.sh') diff --git a/doc/initbuildboot.sh b/doc/initbuildboot.sh deleted file mode 100644 index 72606a6..0000000 --- a/doc/initbuildboot.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh -VER="R0.06" - -BBTEMPLATE= -BBXML= - -USAGE="`basename $0` -xml buildbootxml-to-create -template templatexml-file ($VER) - Currently only supports sequence types Build-command: and Boot-command: - Both files should have path book-*release-info/doc/ - Creates the XML file from the template, inserting build/boot commands - from the various s_targets/XXXtargetXXX/README files - at the place in template with >SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE< - ignoring rest of template - The code tries to fold too long lines, but this is not perfect. Best would - be if the command lines already in README are short enough, e.g. by - using short variables, which work both on shell and uboot command lines" - -while echo "x$1" | egrep '^x-' >/dev/null 2>&1 -do - OPT="$1" ; shift - if [ "$OPT" = "--help" -o "$OPT" = "-h" -o "$OPT" = "-help" ] ; then echo "$USAGE" ; exit ; fi - if [ "$OPT" = "-xml" ] ; then BBXML="$1" ; shift; fi - if [ "$OPT" = "-template" ] ; then BBTEMPLATE="$1" ; shift; fi -done -if [ "$BBTEMPLATE" = "" ]; then echo "ERROR: Missing option -template templatefile"; exit ; fi -if [ "$BBXML" = "" ]; then echo "ERROR: Missing option -xml buildbootxml-to-create"; exit ; fi -if [ ! -f "$BBTEMPLATE" ]; then echo "ERROR: Missing templatefile '$BBTEMPLATE'"; exit; fi -if [ ! -d "`dirname \"$BBXML\"`" ]; then echo "ERROR: Missing parent directory for '$BBXML'"; exit ; fi - -echo "`basename $0` Creating $BBXML from" -TARGETREADMES=`cd s_targets ; ls -d */README | tr '\n' ' '` -echo " $TARGETREADMES" - -# README file formats: -# a) Sequence starts: ___ XXXX:yyyy or ___ XXXX:yyyy conffile -# where XXXX is a type, yyyy is text to be in title -# b) Inside sequence: ___ END ends the sequence (ignore rest of line) -# c) Inside sequence: # Documentation line -# d) Inside sequence: Anything else is command or config lines -# Conv.to XML: ">" "<" "&" and put all inside -# *) Anywhere ____xxxx Leading 4 underlines or more, always ignored -# unless one of the recognized XXXX -# *) Anywhere outside sequence, ignore all -# *) There can be multiple of each type of sequence in each README file -# with different yyyy - - -cat $BBTEMPLATE | awk ' - />SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE$BBXML - - -# Long command lines: The awk code below breaks too long lines, but this is not perfect. -extractcmds_filter() { - echo " " | tr -d '\n' - sed '/^___/d;s/\&/\&/g' | sed 's//\>/g;/^$/d' | \ - awk 'BEGIN { MAX=90; } - ( length($0) > MAX ) { - LINE=$0; - while (length(LINE) > MAX) { - if (index(LINE," ") == 0 ) { - print "ERROR: PROBLEM: No space in too long line:" LINE > "/dev/stderr"; - print $LINE; - next; - } - i=MAX; while ( substr(LINE,i,1) != " " ) { i=i-1; if (i==0) {break;} } - print substr(LINE,0,i) "\\"; - REST=substr(LINE,i+1); - if ( length(REST) == 0 ) { next ; } - LINE=" " REST; - } - if ( length(LINE) > 0 ) { print LINE; next ; } - } - { print;}' - echo "" -} - -extractcmds_for_type() { # target/README BOOTorBUILD - README=s_targets/"$1" - CMDTYPE="$2" - COMMANDSFOR=`egrep "___$CMDTYPE:" $README` - for CMDS in $COMMANDSFOR - do - cmdsfor=`echo "$CMDS" | sed 's/[^:]*://'` - echo " $CMDTYPE for $cmdsfor" - cat "$README" | sed -n "/$COMMANDSFOR/,/___END/p" | extractcmds_filter - done -} - -for targetreadme in $TARGETREADMES -do - TARGET=`dirname $targetreadme` - echo "" >>$BBXML - echo "
" >>$BBXML - echo " Target $TARGET - Build and Boot Instructions" >>$BBXML - echo " NOTE: DO NOT EDIT THIS GENERATED FILE! Only edit the template file." >>$BBXML - echo "
" >>$BBXML - echo " Build Instructions" >>$BBXML - extractcmds_for_type $targetreadme Build-command >>$BBXML - echo "
" >>$BBXML - echo "" >>$BBXML - echo "
" >>$BBXML - echo " Boot Instructions" >>$BBXML - extractcmds_for_type $targetreadme Boot-command >>$BBXML - echo "
" >>$BBXML - echo "
" >>$BBXML -done - -echo "" >>$BBXML -echo "Ready created $BBXML" -- cgit v1.2.3-54-g00ecf