Skip to content

Commit 05854c4

Browse files
committed
Tool updates
1 parent c2823af commit 05854c4

File tree

7 files changed

+69
-16
lines changed

7 files changed

+69
-16
lines changed

bin/bsd2-apropos

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
root="`dirname $0`/.."
4+
src="${root}/src"
5+
6+
title=$1
7+
section=$2
8+
if [ -z "${title}" ]; then
9+
echo "Usage: $0 title [section]"
10+
exit 1
11+
fi
12+
if [ -z "${section}" ]; then
13+
section="[0-9]"
14+
fi
15+
16+
for file in `find "${src}" -type f -name "${title}.${section}" -print`; do
17+
basename $file
18+
done

bin/bsd2-man

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
root="`dirname $0`/.."
4+
src="${root}/src"
5+
6+
title=$1
7+
section=$2
8+
if [ -z "${title}" ]; then
9+
echo "Usage: $0 title [section]"
10+
exit 1
11+
fi
12+
if [ -z "${section}" ]; then
13+
section="[0-9]"
14+
fi
15+
16+
for file in `find "${src}" -type f -name "${title}.${section}" -print`; do
17+
groff -Tascii -man $file | less
18+
done

bin/bsd2-rsh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
# Fix terminal type
4+
case $TERM in
5+
xterm*)
6+
export TERM=xterm
7+
;;
8+
vt1??|vt2??|vt3??)
9+
;;
10+
*)
11+
echo "warning: unknown terminal type $TERM" >2
12+
esac
13+
14+
if [ -z "$*" ]; then
15+
exec rlogin
16+
else
17+
exec rsh "$@"
18+
fi

bin/bsd2-tar

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -z "${TAR}" ]; then
4+
TAR=`which gtar`
5+
fi
6+
if [ -z "${TAR}" ]; then
7+
TAR=`which tar`
8+
fi
9+
10+
if ! "${TAR}" --version | grep -sq '(GNU tar)'; then
11+
echo "$0: This program requires GNU tar"
12+
exit 1
13+
fi
14+
15+
exec "${TAR}" -H ustar "$@"

tools/mksrctar

-7
This file was deleted.

tools/mksystar

-7
This file was deleted.

tools/tar

-2
This file was deleted.

0 commit comments

Comments
 (0)