2021-10-17 07:25:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-11-21 02:57:33 +00:00
|
|
|
my_path="$(command -v yq)"
|
|
|
|
|
|
|
|
if [ -z "$my_path" ]; then
|
2021-11-21 02:59:29 +00:00
|
|
|
echo "'yq' wasn't found in your PATH, so we don't know where to put the man pages."
|
|
|
|
echo "Please update your PATH to include yq, and run this script again."
|
2021-11-21 02:57:33 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ex: ~/.local/bin/yq => ~/.local/
|
|
|
|
my_prefix="$(dirname "$(dirname "$(command -v yq)")")"
|
|
|
|
mkdir -p "$my_prefix/share/man/man1/"
|
|
|
|
cp yq.1 "$my_prefix/share/man/man1/"
|