OLD | NEW |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 | 2 |
3 # Copyright 2011 The Go Authors. All rights reserved. | 3 # Copyright 2011 The Go Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style | 4 # Use of this source code is governed by a BSD-style |
5 # license that can be found in the LICENSE file. | 5 # license that can be found in the LICENSE file. |
6 | 6 |
7 # This script creates the .zip, index, and configuration files for running | 7 # This script creates the .zip, index, and configuration files for running |
8 # godoc on app-engine. | 8 # godoc on app-engine. |
9 # | 9 # |
10 # If an argument is provided it is assumed to be the app-engine godoc directory. | 10 # If an argument is provided it is assumed to be the app-engine godoc directory. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 cleanup() { | 65 cleanup() { |
66 echo "*** cleanup $APPDIR" | 66 echo "*** cleanup $APPDIR" |
67 rm $APPDIR/$ZIPFILE | 67 rm $APPDIR/$ZIPFILE |
68 rm $APPDIR/$INDEXFILE | 68 rm $APPDIR/$INDEXFILE |
69 rm $APPDIR/$SPLITFILES* | 69 rm $APPDIR/$SPLITFILES* |
70 rm $APPDIR/$CONFIGFILE | 70 rm $APPDIR/$CONFIGFILE |
71 } | 71 } |
72 | 72 |
73 makeZipfile() { | 73 makeZipfile() { |
74 echo "*** make $APPDIR/$ZIPFILE" | 74 echo "*** make $APPDIR/$ZIPFILE" |
75 » zip -q -r $APPDIR/$ZIPFILE $GOROOT -i \*.go -i \*.html -i \*.css -i \*.j
s -i \*.txt -i \*.c -i \*.h -i \*.s -i \*.png -i \*.jpg -i \*.sh -i favicon.ico | 75 » zip -q -r $APPDIR/$ZIPFILE $GOROOT -i \*.go -i \*.html -i \*.css -i \*.j
s -i \*.txt -i \*.c -i \*.h -i \*.s -i \*.png -i \*.jpg -i \*.sh -i \*.ico |
76 } | 76 } |
77 | 77 |
78 makeIndexfile() { | 78 makeIndexfile() { |
79 echo "*** make $APPDIR/$INDEXFILE" | 79 echo "*** make $APPDIR/$INDEXFILE" |
80 OUT=/tmp/godoc.out | 80 OUT=/tmp/godoc.out |
81 $GOROOT/src/cmd/godoc/godoc -write_index -index_files=$APPDIR/$INDEXFILE
-zip=$APPDIR/$ZIPFILE 2> $OUT | 81 $GOROOT/src/cmd/godoc/godoc -write_index -index_files=$APPDIR/$INDEXFILE
-zip=$APPDIR/$ZIPFILE 2> $OUT |
82 if [ $? != 0 ]; then | 82 if [ $? != 0 ]; then |
83 error "$GOROOT/src/cmd/godoc/godoc failed - see $OUT for details
" | 83 error "$GOROOT/src/cmd/godoc/godoc failed - see $OUT for details
" |
84 fi | 84 fi |
85 } | 85 } |
(...skipping 26 matching lines...) Expand all Loading... |
112 } | 112 } |
113 | 113 |
114 getArgs "$@" | 114 getArgs "$@" |
115 cleanup | 115 cleanup |
116 makeZipfile | 116 makeZipfile |
117 makeIndexfile | 117 makeIndexfile |
118 splitIndexfile | 118 splitIndexfile |
119 makeConfigfile | 119 makeConfigfile |
120 | 120 |
121 echo "*** setup complete" | 121 echo "*** setup complete" |
OLD | NEW |