From 78a0a598c432a12454e2ab664d7e08c9a50ff791 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 6 Mar 2019 20:46:44 +0100 Subject: mark-as-expendable-dir.in: "echo -n" -> "printf" --- mark-as-expendable-dir.in | 26 ++++++++++++++------------ 1 file 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 -- cgit v1.2.3-70-g09d2