blob: e26436176e0ed4d332ee82f0752011e7c00a9df6 (
plain)
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
|
#!/bin/sh
help() {
cat << EOF
${0}: Open given in the browser.
options:
-l [link] Open link
-h Print this message and exit
EOF
}
err() {
for line in "${@}"; do
echo "${line}" >&2
done
exit 1
}
if ! command -v dmenu > /dev/null 2>&1; then
err "${0}: dmenu must be installed"
fi
if [ "${#}" -eq 0 ]; then
elif [ "${#}" -eq 1 ]; then
[ "${1}" == "-h" ] && help
[ "${1}" == "-l" ]
else
err "invalid usage"
fi
|