dotfiles/home/dot-local/bin/mkcache

17 lines
440 B
Text
Raw Normal View History

2022-02-03 18:33:04 +00:00
#!/usr/bin/env bash
for file in "${@:-"${PWD}"}"; do
if [[ ! -d "${file}" ]]; then
printf $"%s: cannot create cache directory tag '%s': %s\n" \
"${0##*/}" "${file}" $"File is not a directory" >&2
continue
fi
cat >"${file}/CACHEDIR.TAG" <<EOF
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by bash.
# For information about cache directory tags see https://bford.info/cachedir/
EOF
done