From 1250bb53da907d20c0e49355344190c231c06d38 Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Thu, 22 Feb 2024 21:01:11 +0000 Subject: [PATCH] use read IFS instead of for loop in case of space in dir names --- try | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/try b/try index 7053a528..92f80d37 100755 --- a/try +++ b/try @@ -223,7 +223,7 @@ do done ## now we deal with symlinks -for mountpoint in $(cat "$DIRS_AND_MOUNTS") +while IFS="" read -r mountpoint do ## We're only interested in symlinks if ! [ -L "$mountpoint" ] @@ -231,7 +231,7 @@ do continue fi ln -s $(readlink "$mountpoint") "$sandbox_dir/temproot/$mountpoint" -done +done <"$DIRS_AND_MOUNTS" ## Mount a few select devices in /dev mount_devices "$SANDBOX_DIR"