From d93e1a3e214253cffb1a99e8e3dff8d378ace8ac Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 25 Nov 2021 21:09:26 +0300 Subject: add links-chmod --- src/db.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/db.sh b/src/db.sh index 6145c6d..0022ab9 100644 --- a/src/db.sh +++ b/src/db.sh @@ -262,3 +262,17 @@ unlink_obsolete_entries() { fi done } + +chmod_entries() { + if [ "$#" -ne 1 ]; then + echo "usage: ${FUNCNAME[0]} MODE" >&2 + return 1 + fi + + local mode="$1" + shift + + if [ "${#shared_paths[@]}" -ne 0 ]; then + is_dry_run || chmod -- "$mode" ${shared_paths[@]+"${shared_paths[@]}"} + fi +} -- cgit v1.2.3