diff options
author | Erich Eckner <git@eckner.net> | 2019-03-06 20:46:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-03-18 19:47:32 +0100 |
commit | 78a0a598c432a12454e2ab664d7e08c9a50ff791 (patch) | |
tree | e83255d0392ae2560a48115af7d5e3625f2c1124 | |
parent | 356ca862cfda18d9a916faa26d1294a00ed4f5e2 (diff) | |
download | mark-as-expendable-dir-78a0a598c432a12454e2ab664d7e08c9a50ff791.tar.xz |
mark-as-expendable-dir.in: "echo -n" -> "printf"
-rw-r--r-- | mark-as-expendable-dir.in | 26 |
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 |