xref: /freebsd/crypto/openssh/fixalgorithms (revision e4a9863f)
1*e4a9863fSDag-Erling Smørgrav#!/bin/sh
2*e4a9863fSDag-Erling Smørgrav#
3*e4a9863fSDag-Erling Smørgrav# fixciphers - remove unsupported ciphers from man pages.
4*e4a9863fSDag-Erling Smørgrav# Usage: fixpaths /path/to/sed cipher1 [cipher2] <infile >outfile
5*e4a9863fSDag-Erling Smørgrav#
6*e4a9863fSDag-Erling Smørgrav# Author: Darren Tucker (dtucker at zip com.au).  Placed in the public domain.
7*e4a9863fSDag-Erling Smørgrav
8*e4a9863fSDag-Erling Smørgravdie() {
9*e4a9863fSDag-Erling Smørgrav	echo $*
10*e4a9863fSDag-Erling Smørgrav	exit -1
11*e4a9863fSDag-Erling Smørgrav}
12*e4a9863fSDag-Erling Smørgrav
13*e4a9863fSDag-Erling SmørgravSED=$1
14*e4a9863fSDag-Erling Smørgravshift
15*e4a9863fSDag-Erling Smørgrav
16*e4a9863fSDag-Erling Smørgravfor c in $*; do
17*e4a9863fSDag-Erling Smørgrav	subs="$subs -e /.Dq.$c.*$/d"
18*e4a9863fSDag-Erling Smørgrav	subs="$subs -e s/$c,//g"
19*e4a9863fSDag-Erling Smørgravdone
20*e4a9863fSDag-Erling Smørgrav
21*e4a9863fSDag-Erling Smørgrav# now remove any entirely empty lines
22*e4a9863fSDag-Erling Smørgravsubs="$subs -e /^$/d"
23*e4a9863fSDag-Erling Smørgrav
24*e4a9863fSDag-Erling Smørgrav${SED} $subs
25*e4a9863fSDag-Erling Smørgrav
26*e4a9863fSDag-Erling Smørgravexit 0
27