Mirror of Awesome Self Hosted
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.9 KiB

  1. #!/usr/bin/make -f
  2. SHELL = /bin/bash
  3. all: checks
  4. checks: missinglicenselanguage
  5. noexternallink:
  6. @echo "Lines with no source/demo/other link:"
  7. @sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '^ *\* ' | egrep --color=always '[a-z\.] `'
  8. missinglicenselanguage:
  9. @echo "Lines with only 1 or no language/license entry:"
  10. @sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '^ *\* ' | egrep -v '` `'
  11. contrib:
  12. @git shortlog -sne
  13. add:
  14. @#add a new entry
  15. @printf 'Software name: ' ;\
  16. read Name; if [ -z "$$Name" ]; then printf 'Missing software name!\n'; exit 1 ; fi ;\
  17. printf 'Homepage URL: ' ;\
  18. read Url; if [ -z "$$Url" ]; then printf 'Missing main project URL!\n'; exit 1 ; fi ;\
  19. printf 'Description (max 250 char): ' ;\
  20. read Description; if [ -z "$$Description" ]; then printf 'Missing description!\n'; exit 1 ; fi ;\
  21. printf 'License: ' ;\
  22. read License; if [ -z "$$License" ]; then printf 'Missing license!\n'; exit 1 ; fi ;\
  23. printf 'Main server-side language/platform/requirement: ' ;\
  24. read Language; if [ -z "$$Language" ]; then printf 'Missing language!\n'; exit 1 ; fi ;\
  25. printf 'Demo URL (if any): ' ;\
  26. read Demo; if [ -z "$$Demo" ]; then CDemo="" ; else CDemo="[Demo]($$Demo)" ; fi ;\
  27. printf 'Source code URL (if different from Homepage): ' ;\
  28. read Source; if [ -z "$$Source" ]; then CSource="" ; else CSource="[Source Code]($$Source)" ; fi ;\
  29. if [[ "$$CSource" == "" && "$$Demo" == "" ]]; \
  30. then Moreinfo="";\ printf "debug" ;\
  31. else Moreinfo=$$(echo "($$CSource$$CDemo)" | sed 's|)\[|\], [|g') ;\
  32. fi ;\
  33. echo -e "Copy this entry to your clipboard, paste it in the appropriate category:\n\n" ;\
  34. echo " * [$$Name]($$Url) - $${Description}. $$Moreinfo \`$$License\` \`$$Language\`"
  35. #TODO ask for category and insert item accordingly
  36. #TODO check for unsorted entries
  37. #TODO automatically sort entries/sections
  38. #TODO autoupdate contributors list