summaryrefslogtreecommitdiff
path: root/cache-tag-this-dir
blob: 0dad1c8ec4fccc666c683a0e1f6181b2fd569b87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

set -euo pipefail

TAG_FILE_NAME=CACHEDIR.TAG

if [ -f "$TAG_FILE_NAME" ]; then
  echo "File $TAG_FILE_NAME already exists, skipping any action."
else
  COMMENT="user $USER"
  cat <<EOF >"$TAG_FILE_NAME"
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by $COMMENT.
# For information about cache directory tags, see: https://bford.info/cachedir/
EOF
fi