From 3eb5b0b8f84a9a94bfcd1111df5e303be42e98eb Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Mon, 18 Mar 2019 10:20:35 +0700 Subject: [PATCH] Clean the symlinks finding part --- script | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script b/script index 08fad1b..be5db97 100755 --- a/script +++ b/script @@ -267,9 +267,10 @@ find bootstrap -executable -type f | \ > bootstrap/EXECUTABLES.txt echo "finding symlinks..." -for LINK in $(find bootstrap -type l); do - LNK=$(echo "$LINK" | sed s@^bootstrap/@@) - TGT=$(readlink $LINK) +find bootstrap -type l | +while read -r LINK; do + LNK=${LINK#bootstrap/} + TGT=$(readlink "$LINK") echo "$TGT←$LNK" >> bootstrap/SYMLINKS.txt rm "$LINK" done