summary.sh 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. # colorful summary
  3. SrsHlsSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_HLS == YES ]]; then SrsHlsSummaryColor="\${GREEN}"; fi
  4. SrsDvrSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_DVR == YES ]]; then SrsDvrSummaryColor="\${GREEN}"; fi
  5. SrsNginxSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_NGINX == YES ]]; then SrsNginxSummaryColor="\${GREEN}"; fi
  6. SrsSslSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_SSL == YES ]]; then SrsSslSummaryColor="\${GREEN}"; fi
  7. SrsFfmpegSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_FFMPEG_TOOL == YES ]]; then SrsFfmpegSummaryColor="\${GREEN}"; fi
  8. SrsTranscodeSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_TRANSCODE == YES ]]; then SrsTranscodeSummaryColor="\${GREEN}"; fi
  9. SrsIngestSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_INGEST == YES ]]; then SrsIngestSummaryColor="\${GREEN}"; fi
  10. SrsHttpCallbackSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_HTTP_CALLBACK == YES ]]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi
  11. SrsHttpServerSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_HTTP_SERVER == YES ]]; then SrsHttpServerSummaryColor="\${GREEN}"; fi
  12. SrsHttpApiSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_HTTP_API == YES ]]; then SrsHttpApiSummaryColor="\${GREEN}"; fi
  13. SrsStreamConverterSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_STREAM_CASTER == YES ]]; then SrsStreamConverterSummaryColor="\${GREEN}"; fi
  14. SrsUtestSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_UTEST == YES ]]; then SrsUtestSummaryColor="\${GREEN}"; fi
  15. SrsGperfSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPERF == YES ]]; then SrsGperfSummaryColor="\${GREEN}"; fi
  16. SrsGperfMCSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPERF_MC == YES ]]; then SrsGperfMCSummaryColor="\${YELLOW}"; fi
  17. SrsGperfMDSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPERF_MD == YES ]]; then SrsGperfMDSummaryColor="\${YELLOW}"; fi
  18. SrsGperfMPSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPERF_MP == YES ]]; then SrsGperfMPSummaryColor="\${YELLOW}"; fi
  19. SrsGperfCPSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPERF_CP == YES ]]; then SrsGperfCPSummaryColor="\${YELLOW}"; fi
  20. SrsGprofSummaryColor="\${GREEN}(Disabled) "; if [[ $SRS_GPROF == YES ]]; then SrsGprofSummaryColor="\${YELLOW}"; fi
  21. SrsValgrindSummaryColor="\${YELLOW}(Disabled) "; if [[ $SRS_VALGRIND == YES ]]; then SrsValgrindSummaryColor="\${GREEN}"; fi
  22. cat <<END > ${SRS_OBJS}/${SRS_BUILD_SUMMARY}
  23. #!/bin/bash
  24. #####################################################################################
  25. # linux shell color support.
  26. RED="\\${RED}"
  27. GREEN="\\${GREEN}"
  28. YELLOW="\\${YELLOW}"
  29. BLACK="\\${BLACK}"
  30. echo -e "\${GREEN}The build summary:\${BLACK}"
  31. echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
  32. echo -e " \${GREEN}For SRS benchmark, gperf, gprof and valgrind, please read:\${BLACK}"
  33. echo -e " \${GREEN} https://www.jianshu.com/p/6d4a89359352\${BLACK}"
  34. echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
  35. echo -e " |\${GREEN}The main server usage: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}"
  36. echo -e " | ${SrsHlsSummaryColor}About HLS, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/delivery-hls\${BLACK}"
  37. echo -e " | ${SrsDvrSummaryColor}About DVR, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/dvr\${BLACK}"
  38. echo -e " | ${SrsSslSummaryColor}About SSL, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/rtmp-handshake\${BLACK}"
  39. echo -e " | ${SrsTranscodeSummaryColor}About transcoding, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/ffmpeg\${BLACK}"
  40. echo -e " | ${SrsIngestSummaryColor}About ingester, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/ingest\${BLACK}"
  41. echo -e " | ${SrsHttpCallbackSummaryColor}About http-callback, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/http-callback\${BLACK}"
  42. echo -e " | ${SrsHttpServerSummaryColor}Aoubt http-server, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/http-server\${BLACK}"
  43. echo -e " | ${SrsHttpApiSummaryColor}About http-api, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/http-api\${BLACK}"
  44. echo -e " | ${SrsStreamConverterSummaryColor}About stream-caster, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/streamer\${BLACK}"
  45. echo -e " | ${SrsValgrindSummaryColor}About VALGRIND, please read https://github.com/ossrs/state-threads/issues/2\${BLACK}"
  46. echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
  47. echo -e "\${GREEN}binaries, please read https://ossrs.net/lts/zh-cn/docs/v4/doc/install\${BLACK}"
  48. echo "You can:"
  49. echo " ./objs/srs -c conf/srs.conf"
  50. echo " to start the srs server, with config conf/srs.conf."
  51. END