File: doc

package info (click to toggle)
ufw 0.36.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,824 kB
  • sloc: python: 8,731; sh: 5,950; makefile: 200
file content (40 lines) | stat: -rwxr-xr-x 445 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

if [ -z "$SNAP" ]; then
    echo "SNAP not set"
    exit 1
fi

docdir="$SNAP/docs"

usage() {
    cat <<EOM
Usage: ufw.doc <doc>

Available docs are:
ufw-on-snappy
ufw
ufw-framework
iptables
ip6tables
iptables-restore
ip6tables-restore

Eg:
$ ufw.doc ufw-on-snappy | less
EOM
}

if [ -z "$1" ]; then
    usage
    exit 1
fi

doc="$docdir/$1"
if [ ! -f "$doc" ]; then
    echo "Could not find '$1'"
    usage
    exit 1
fi

cat "$doc"