summaryrefslogtreecommitdiffstats
path: root/doc/initbuildboot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/initbuildboot.sh')
-rw-r--r--doc/initbuildboot.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/initbuildboot.sh b/doc/initbuildboot.sh
index ea8dc12..37b691f 100644
--- a/doc/initbuildboot.sh
+++ b/doc/initbuildboot.sh
@@ -1,14 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2VER="R0.06" 2VER="R0.07"
3# R0.07/lejo 2017-01-20 Add -readmebasedir to the README files from the manifest instead of s_targets
3 4
4BBTEMPLATE= 5BBTEMPLATE=
5BBXML= 6BBXML=
7BB_TARGETREADME_BASE=
6 8
7USAGE="`basename $0` -xml buildbootxml-to-create -template templatexml-file ($VER) 9USAGE="`basename $0` -xml buildbootxml-to-create -template templatexml-file -readmebasedir targetreadmebase ($VER)
8 Currently only supports sequence types Build-command: and Boot-command: 10 Currently only supports sequence types Build-command: and Boot-command:
9 Both files should have path book-*release-info/doc/ 11 Both files should have path book-*release-info/doc/
10 Creates the XML file from the template, inserting build/boot commands 12 Creates the XML file from the template, inserting build/boot commands
11 from the various s_targets/XXXtargetXXX/README files 13 from the various s_manifests/el_manifest-XXX/XXXtargetXXX/README files
12 at the place in template with >SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE< 14 at the place in template with >SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE<
13 ignoring rest of template 15 ignoring rest of template
14 The code tries to fold too long lines, but this is not perfect. Best would 16 The code tries to fold too long lines, but this is not perfect. Best would
@@ -21,14 +23,16 @@ do
21 if [ "$OPT" = "--help" -o "$OPT" = "-h" -o "$OPT" = "-help" ] ; then echo "$USAGE" ; exit ; fi 23 if [ "$OPT" = "--help" -o "$OPT" = "-h" -o "$OPT" = "-help" ] ; then echo "$USAGE" ; exit ; fi
22 if [ "$OPT" = "-xml" ] ; then BBXML="$1" ; shift; fi 24 if [ "$OPT" = "-xml" ] ; then BBXML="$1" ; shift; fi
23 if [ "$OPT" = "-template" ] ; then BBTEMPLATE="$1" ; shift; fi 25 if [ "$OPT" = "-template" ] ; then BBTEMPLATE="$1" ; shift; fi
26 if [ "$OPT" = "-readmebasedir" ] ; then BB_TARGETREADME_BASE="$1" ; shift; fi
24done 27done
25if [ "$BBTEMPLATE" = "" ]; then echo "ERROR: Missing option -template templatefile"; exit ; fi 28if [ "$BBTEMPLATE" = "" ]; then echo "ERROR: Missing option -template templatefile"; exit ; fi
26if [ "$BBXML" = "" ]; then echo "ERROR: Missing option -xml buildbootxml-to-create"; exit ; fi 29if [ "$BBXML" = "" ]; then echo "ERROR: Missing option -xml buildbootxml-to-create"; exit ; fi
27if [ ! -f "$BBTEMPLATE" ]; then echo "ERROR: Missing templatefile '$BBTEMPLATE'"; exit; fi 30if [ ! -f "$BBTEMPLATE" ]; then echo "ERROR: Missing templatefile '$BBTEMPLATE'"; exit; fi
28if [ ! -d "`dirname \"$BBXML\"`" ]; then echo "ERROR: Missing parent directory for '$BBXML'"; exit ; fi 31if [ ! -d "`dirname \"$BBXML\"`" ]; then echo "ERROR: Missing parent directory for '$BBXML'"; exit ; fi
32if [ ! -d "$BB_TARGETREADME_BASE" ]; then echo "ERROR: Missing basedir for README files '$BB_TARGETREADME_BASE'"; exit; fi
29 33
30echo "`basename $0` Creating $BBXML from" 34echo "`basename $0` Creating $BBXML from"
31TARGETREADMES=`cd s_targets ; ls -d */README | tr '\n' ' '` 35TARGETREADMES=`cd $BB_TARGETREADME_BASE ; ls -d */README | tr '\n' ' '`
32echo " $TARGETREADMES" 36echo " $TARGETREADMES"
33 37
34# README file formats: 38# README file formats:
@@ -77,7 +81,7 @@ extractcmds_filter() {
77} 81}
78 82
79extractcmds_for_type() { # target/README BOOTorBUILD 83extractcmds_for_type() { # target/README BOOTorBUILD
80 README=s_targets/"$1" 84 README=$BB_TARGETREADME_BASE/"$1"
81 CMDTYPE="$2" 85 CMDTYPE="$2"
82 COMMANDSFOR=`egrep "___$CMDTYPE:" $README` 86 COMMANDSFOR=`egrep "___$CMDTYPE:" $README`
83 for CMDS in $COMMANDSFOR 87 for CMDS in $COMMANDSFOR