add motd generator script
[freebsd-maintainer-scripts/.git] / gensrc
1 #!/bin/csh
2
3 if (${?argv} == 0 || ${#argv} != 1) then
4     printf "%s\n" "Usage: gensrc with or without"
5     exit
6 endif
7
8 switch ($argv[1])
9 case without:
10     zgrep 'WITHOUT' /usr/share/man/man5/src.conf.5.gz | sed -n 's/.*\(WITHOUT_[^ ]*\).*$/\1/p' | sort -u
11     breaksw
12 case with:
13     zgrep 'WITH' /usr/share/man/man5/src.conf.5.gz | sed -n 's/.*\(WITH_[^ ]*\).*$/\1/p' | sort -u
14     breaksw
15 default:
16     printf "%s\n" "Usage: gensrc with or without"
17 endsw