dotfiles
Seven years worth of accumulated configuration cruft
dotfiles/scripts/.local/bin/cachedir
Download raw file: scripts/.local/bin/cachedir
#!/bin/sh add_cachedir() { dir="$1" echo "Directory will now be excluded from backups and tarballs: $dir" cat <<-EOF > "$dir/CACHEDIR.TAG" Signature: 8a477f597d28d172789f06886806bc55 # This file is a cache directory tag created by (application name). # For information about cache directory tags, see: # http://www.brynosaurus.com/cachedir/ EOF } if [ -z "$1" ]; then echo "Directory not specified, assuming $(pwd)" add_cachedir "$(pwd)" else for dir in "$@"; do add_cachedir "$dir" shift done fi