py-pdf-docs: tiny script to open Python PDF docs
This commit is contained in:
parent
010ecad8ce
commit
a647b0c5b7
15
py-pdf-docs.sh
Executable file
15
py-pdf-docs.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Open Python PDF docs.
|
||||||
|
|
||||||
|
if [ ! -v PYTHON_DOCS_PATH ]; then
|
||||||
|
echo "You need to define PYTHON_DOCS_PATH."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$1" ]]; then
|
||||||
|
filename="$(find "$PYTHON_DOCS_PATH" -type f -name "*$1*" | head -n 1)"
|
||||||
|
else
|
||||||
|
filename="$PYTHON_DOCS_PATH/library.pdf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
nohup open "$filename" > /dev/null 2>&1
|
Loading…
Reference in a new issue