move some scripts to devel subfolder
This commit is contained in:
parent
284a454a9a
commit
74d8beff3a
8 changed files with 0 additions and 0 deletions
17
devel/dmtexdoc
Executable file
17
devel/dmtexdoc
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/zsh
|
||||
zparseopts -D -E -help=help h=help -update=update u=update
|
||||
|
||||
CACHE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/dtexdoc.list"
|
||||
SOURCES_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/dmtexdoc/sources"
|
||||
|
||||
if [[ -n "$help" ]]; then
|
||||
echo "Usage: $0 [-u|--update]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "$update" || ! -e "$CACHE_FILE" ]]; then
|
||||
find -L ${$(which texdoc):h:h:h}/texmf-dist/doc/ "${(@f)$(<$SOURCES_FILE)}" \
|
||||
-iname '*.pdf' -printf "%f\n" \
|
||||
| sed -e 's/\..*//' | sort | uniq > $CACHE_FILE
|
||||
fi
|
||||
texdoc $(dmenu < $CACHE_FILE)
|
Loading…
Add table
Add a link
Reference in a new issue