diff options
Diffstat (limited to '')
-rw-r--r-- | src/db.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -262,3 +262,18 @@ unlink_obsolete_entries() { fi done } + +chmod_entries() { + if [ "$#" -ne 1 ]; then + echo "usage: ${FUNCNAME[0]} MODE" >&2 + return 1 + fi + + local mode="$1" + shift + + echo "Applying mode $mode to shared files..." + if [ "${#shared_paths[@]}" -ne 0 ]; then + is_dry_run || chmod -- "$mode" ${shared_paths[@]+"${shared_paths[@]}"} + fi +} |