ulthar.xyz > Repos

dotfiles

Seven years worth of accumulated configuration cruft
About Files Commits git clone https://ulthar.xyz/repos/dotfiles/dotfiles.git

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
Generated 2025-03-07 15:24:27 -0700 by RepoRat