?? release-docs.sh
字號:
#!/bin/shecho "This script builds docs on Peter's Orocos tree1a. expects a directory orocos-VERSION and orocos-VERSION/build1b. OR if version is 'latest' , do fresh check out from trunk 2. make orocos-dist in packages3. make doc in build/doc4. tar the result5. copy over all the doc-tar files6. extract and move files on server"if [ x$1 == x ] ; then echo "Please provide version-string parameter"exit 1fi;if [ x$2 != xdev ] ; then DEV=noelseDEV=yesfi;VERSION=$1unset ECOS_REPOSITORYecho "VERSION is set to $VERSION (use 'latest' to install trunk on server)"echo "DEV is set to $DEV (use 'dev' as arg2 to install in 'doc/latest' on server)"echo "Press d to copy Documentation to server, any other key to build and Ctrl-C to abort..."read -s -n1 xif [ x$x != xd ] ; then#if latest, check out trunkif test x$VERSION = xlatest; then rm -rf orocos-latest svn export ../orocos-trunk orocos-$VERSION cd orocos-$VERSION ./autogen.sh mkdir build cd build ## add the -r1234 tag to version number ../configure --enable-subversion cd ../..fi#all should be equal for LATEST and normal :if ! test -d orocos-$VERSION ; then echo "Could not find orocos-$VERSION !" exit 1ficd orocos-$VERSION # Build Online documentation and prepare eps files for later cd packages make doc-dist || exit 1 cd ../build make doxygen_headers make doxy-dist || exit 1 cd ..# Build base packageif ! test -d build ; then echo "No build directory !" exit 1fi cd build #must do clean to force rebuild of orocos-manual make clean make docs cd doc make manuals tar -czf orocos-manual.tgz $(find . -name "*.png") *.pdf *.html ||exit 1 cd ..cd ..#cleanup leftoverscd packages make doc-dist-cleancd ..echo "Press a key to copy Docs to server, Ctrl-C to abort..."read -s -n1else cd orocos-$VERSION || exit 1fi; # press dif test x$SSH_USER = x; then SSH_USER=psoetensfi;# Docs :# Save in version subdir as tar, save latest in doc dir. (saves space).cd packagesif test x$DEV != xyes ; then ssh $SSH_USER@srv04 "mkdir -p pub_html/orocos/packages/$VERSION/doc"ssh $SSH_USER@srv04 "mkdir -p pub_html/orocos/doc/"scp orocos-docs.tar $SSH_USER@srv04:pub_html/orocos/packages/$VERSION/doc || exit 1scp ../build/doc/orocos-manual.tgz $SSH_USER@srv04:pub_html/orocos/packages/$VERSION/doc/orocos-manual.tgz || exit 1scp ../build/orocos-api.tar.bz2 $SSH_USER@srv04:pub_html/orocos/ || exit 1ssh $SSH_USER@srv04 "cd pub_html/orocos/doc && tar -xf ../packages/$VERSION/doc/orocos-docs.tar && cp ../packages/$VERSION/doc/*.tgz .for i in \$(ls *.tgz); do tar -xzf \$i; rm -f \$i; done;mv orocos-changes.html ../packages/$VERSION/orocos-changes-$VERSION.htmlcd ..rm -rf doc/apitar -xjf orocos-api.tar.bz2mv orocos-api.tar.bz2 doc/ " || exit 1#copy the imagesscp -r ../doc/images $SSH_USER@srv04:pub_html/orocos/doc/#copy CSSscp -r ../doc/*.css $SSH_USER@srv04:pub_html/orocos/doc/cd ..scp NEWS $SSH_USER@srv04:pub_html/orocos/packages/$VERSION/NEWS.txtelse # dev :ssh $SSH_USER@srv04 "mkdir -p pub_html/orocos/doc/latest"scp orocos-docs.tar $SSH_USER@srv04:pub_html/orocos/doc/latest || exit 1scp ../build/doc/orocos-manual.tgz $SSH_USER@srv04:pub_html/orocos/doc/latest/orocos-manual.tgz || exit 1scp ../build/orocos-api.tar.bz2 $SSH_USER@srv04:pub_html/orocos/doc/latest || exit 1ssh $SSH_USER@srv04 "cd pub_html/orocos/doc/latesttar -xf orocos-docs.tar && for i in \$(ls *.tgz); do tar -xzf \$i; rm -f \$i; done;rm -rf api && tar -xjf orocos-api.tar.bz2 && mv doc/api api && rmdir doc " || exit 1#copy the imagesscp -r ../doc/images $SSH_USER@srv04:pub_html/orocos/doc/latest#copy CSSscp -r ../doc/*.css $SSH_USER@srv04:pub_html/orocos/doc/cd ..fi# copy latest news to packages directory :scp NEWS $SSH_USER@srv04:pub_html/orocos/packages/NEWS.txt
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -