3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
5 ## Use of this source code is governed by a BSD-style license
6 ## that can be found in the LICENSE file in the root of the source
7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree.
18 echo "Usage: $self <example.txt>"
29 while IFS=$'\n' read -r t_line; do
32 if [ "x$on_block" == "xyes" ]; then
39 if [ "x$on_block" == "xyes" ]; then
45 echo "WARNING: failed to find text for block $block_name" >&2
50 [ -f "$txt" ] || die_usage
51 read -r template < "$txt"
53 @TEMPLATE*) template=${txt%/*}/${template##@TEMPLATE } ;;
54 *) die "Failed to parse template name from '$template'" ;;
58 fence="${fence}${fence}"
59 fence="${fence}${fence}"
60 fence="${fence}${fence}"
61 while IFS=$'\n' read -r line; do
64 template=${template##@TEMPLATE }
65 template=${template%.c}.txt
68 include_block < "$template"
71 block_name=${line##~* }
72 [ "$block_name" == "INTRODUCTION" ] || echo "$fence"
80 echo "Putting It All Together"
81 echo "======================="
83 ${self%/*}/gen_example_code.sh "${txt}"