From 4d1bc51acbe8aaf0347f553ba3b8dd2e480cb0cf Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 17 Apr 2025 23:56:14 +0200 Subject: [PATCH] Fix. --- bookworm/scripts/lib/copy_dirtrees_of_tags | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookworm/scripts/lib/copy_dirtrees_of_tags b/bookworm/scripts/lib/copy_dirtrees_of_tags index b938848..4fed3ae 100644 --- a/bookworm/scripts/lib/copy_dirtrees_of_tags +++ b/bookworm/scripts/lib/copy_dirtrees_of_tags @@ -23,7 +23,7 @@ copy_dirtrees_of_tags() { if [ "${_FILENAME}" = 'KILL_ME' ]; then # only there to ensure directory continue fi - if $(echo "${_FILENAME}" | grep -E '^LINK_ME'); then + if [ $(echo "${_FILENAME}" | grep -E '^LINK_ME' | wc -l) -gt 0 ]; then _LINK_TARGET=$(cat "${_PATH_REL}" | head -1) _LINK_NAME=$(cat "${_PATH_REL}" | tail -1) if [ -z "${_LINK_NAME}" ]; then @@ -46,7 +46,7 @@ copy_dirtrees_of_tags() { # for all paths written into user home directories, chown to respective users for _PATH in ${_PATHS_WRITTEN}; do - if $(echo "${_PATH}" | grep -E '^/home/'); then + if [ $(echo "${_PATH}" | grep -E '^/home/' | wc -l) -gt 0 ]; then _USERNAME=$(echo "${_PATH}" | sed -E '/^\/home\///' | sed -E '/\/.*//i') chown -R "${_USERNAME}:${_USERNAME}" "${_PATH}" fi -- 2.30.2