home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 17 Apr 2025 21:13:37 +0000 (23:13 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 17 Apr 2025 21:13:37 +0000 (23:13 +0200)
bookworm/scripts/lib/copy_dirtrees_of_tags

index 22f21949ebd3d1e0b0676c63da8f4862e0c20aa5..f6ae7f87d69604ca742ec8b8186b1bdfd759c0d1 100644 (file)
@@ -15,7 +15,7 @@ copy_dirtrees() {
             # ensure directory by mkdir -p; to avoid later chowning pre-existing directories,
             # collect only what's returned by the command as actually newly created
             _CREATION_SUMMARY=$(mkdir -pv "${_DIRECTORY}")
-            _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed -E "s/\$mkdir: created directory '//g"
+            _CREATED_PATHS=$(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g" | sed -E "s/\$mkdir: created directory '//g")
             _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}"
 
             # handle dirtree creation instruction files
@@ -39,7 +39,7 @@ copy_dirtrees() {
             # actual file copying
             _PATH_SOURCE=$(realpath "${_PATH_REL}")
             _CREATION_SUMMARY=$(cp -av "${_PATH_SOURCE}" "${_PATH_TARGET}")
-            _CREATED_PATHS=(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g") | sed "s/.*' -> '//g")
+            _CREATED_PATHS=$(echo "${_CREATION_SUMMARY}" | sed -E "s/'\$//g" | sed "s/.*' -> '//g")
             _PATHS_WRITTEN="${_CREATED_PATHS}${_PATHS_WRITTEN}"
         done
         cd - > /dev/null
@@ -47,7 +47,7 @@ copy_dirtrees() {
     
     # for all paths written into user home directories, chown to respective users
     for _PATH in ${_PATHS_WRITTEN}; do
-        _IS_FOR_USER=$(echo "${_PATH}" | grep -E '^/home/")
+        _IS_FOR_USER=$(echo "${_PATH}" | grep -E '^/home/')
         if [ -z "${_IS_FOR_USER}" ]; then
             continue
         fi