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