#!/bin/sh # Cache pdf files to be opened with dz cache="${XDG_CACHE_HOME:-$HOME/.cache}"/dz if [ "$1" = "-r" ] || [ ! -e "$cache" ]; then find "$HOME" -mindepth 1 \( -name ".*" -o -path "$HOME/cell" -o -path "$HOME/phone/*" \) -prune -o -print | sed '/\.pdf$/!d' | sort >"$cache" # notify-send "dz cache updated." fi cat "$cache"