| 1 | #!/bin/sh -x
|
|---|
| 2 |
|
|---|
| 3 | # Generate HTML documentation from GCC Texinfo docs.
|
|---|
| 4 | # This version is for GCC 3.1 and later versions.
|
|---|
| 5 |
|
|---|
| 6 | # Run this from /tmp.
|
|---|
| 7 | CVSROOT=/cvs/gcc
|
|---|
| 8 | export CVSROOT
|
|---|
| 9 |
|
|---|
| 10 | PATH=/usr/local/bin:$PATH
|
|---|
| 11 |
|
|---|
| 12 | WWWBASE=/www/gcc/htdocs
|
|---|
| 13 | WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted
|
|---|
| 14 | WWWPREPROCESS='/www/gcc/bin/preprocess -r'
|
|---|
| 15 |
|
|---|
| 16 | # Process options -rrelease and -ddirectory
|
|---|
| 17 | RELEASE=""
|
|---|
| 18 | SUBDIR=""
|
|---|
| 19 |
|
|---|
| 20 | while [ $# -gt 0 ]; do
|
|---|
| 21 | case $1 in
|
|---|
| 22 | -r*)
|
|---|
| 23 | if [ -n "$RELEASE" ]; then
|
|---|
| 24 | echo "Multiple releases specified" >&2
|
|---|
| 25 | exit 1
|
|---|
| 26 | fi
|
|---|
| 27 | RELEASE="${1#-r}"
|
|---|
| 28 | if [ -z "$RELEASE" ]; then
|
|---|
| 29 | shift
|
|---|
| 30 | RELEASE="$1"
|
|---|
| 31 | if [ -z "$RELEASE" ]; then
|
|---|
| 32 | echo "No release specified with -r" >&2
|
|---|
| 33 | exit 1
|
|---|
| 34 | fi
|
|---|
| 35 | fi
|
|---|
| 36 | ;;
|
|---|
| 37 | -d*)
|
|---|
| 38 | if [ -n "$SUBDIR" ]; then
|
|---|
| 39 | echo "Multiple subdirectories specified" >&2
|
|---|
| 40 | exit 1
|
|---|
| 41 | fi
|
|---|
| 42 | SUBDIR="${1#-d}"
|
|---|
| 43 | if [ -z "$SUBDIR" ]; then
|
|---|
| 44 | shift
|
|---|
| 45 | SUBDIR="$1"
|
|---|
| 46 | if [ -z "$SUBDIR" ]; then
|
|---|
| 47 | echo "No subdirectory specified with -d" >&2
|
|---|
| 48 | exit 1
|
|---|
| 49 | fi
|
|---|
| 50 | fi
|
|---|
| 51 | ;;
|
|---|
| 52 | *)
|
|---|
| 53 | echo "Unknown argument \"$1\"" >&2
|
|---|
| 54 | exit 1
|
|---|
| 55 | ;;
|
|---|
| 56 | esac
|
|---|
| 57 | shift
|
|---|
| 58 | done
|
|---|
| 59 |
|
|---|
| 60 | if [ -n "$RELEASE" ] && [ -z "$SUBDIR" ]; then
|
|---|
|
|---|