generate_docs.sh 590 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. CONFIG_NAME=doxygen
  3. if [ ! -z $1 ]; then
  4. CONFIG_NAME=$1
  5. fi
  6. sed -i .bak '/CC_DEPRECATED_ATTRIBUTE CC_DLL/,/NS_CC_END/d' ../../cocos/base/ccUTF8.h
  7. version=`grep -e 'return' ../../cocos/cocos2d.cpp | awk '{print substr($3,0,length($3)-2)}'`
  8. echo $version
  9. cd ../../docs
  10. #we should read cocos2d.cpp and retrieve the version number
  11. sed -i .bak "s/3\.0/${version}/g" doxygen.config
  12. doxygen ${CONFIG_NAME}.config
  13. #restore the old doxygen.config
  14. mv doxygen.config.bak doxygen.config
  15. #restore the old ccUTF8.h
  16. mv ../cocos/base/ccUTF8.h.bak ../cocos/base/ccUTF8.h
  17. rm debug.txt