summaryrefslogtreecommitdiff
path: root/mark-as-expendable-dir.in
diff options
context:
space:
mode:
Diffstat (limited to 'mark-as-expendable-dir.in')
-rw-r--r--mark-as-expendable-dir.in26
1 files changed, 14 insertions, 12 deletions
diff --git a/mark-as-expendable-dir.in b/mark-as-expendable-dir.in
index e66c97b..e615d3c 100644
--- a/mark-as-expendable-dir.in
+++ b/mark-as-expendable-dir.in
@@ -59,18 +59,20 @@ done
for dir in "$@"
do
- (
- echo -n 'Signature: '
- echo -n '.IsCacheDirectory' | \
+ {
+ printf 'Signature: '
+ printf '.IsCacheDirectory' | \
md5sum - | \
- cut -d ' ' -f 1
- echo '# This file is a cache directory tag created by '"$(basename "$0")"' for '"${caller}"'.'
- echo '# For information about cache directory tags, see:'
- echo '# http://www.brynosaurus.com/cachedir/'
- ) > "${dir}/CACHEDIR.TAG"
- (
- echo '+ .rsync-filter'
- echo '- *'
- ) > "${dir}/.rsync-filter"
+ cut -d' ' -f 1
+ printf '# This file is a cache directory tag created by %s for %s.\n' \
+ "$(basename "$0")" \
+ "${caller}"
+ printf '# For information about cache directory tags, see:\n'
+ printf '# http://www.brynosaurus.com/cachedir/\n'
+ } > "${dir}/CACHEDIR.TAG"
+ {
+ printf '+ .rsync-filter\n'
+ printf -- '- *\n'
+ } > "${dir}/.rsync-filter"
touch "${dir}/.nobackup"
done