From 2aafb7dd9abc54b6e8ac1ea0b4a2bf3a6cf9779c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 1 Sep 2023 15:20:36 -0500 Subject: [PATCH] Slight simplification. --- mkroot/record-commands | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mkroot/record-commands b/mkroot/record-commands index c40dd018..6e63c5b7 100755 --- a/mkroot/record-commands +++ b/mkroot/record-commands @@ -18,14 +18,11 @@ then [ -e "$(which logpath)" ] && cp -H "$(which logpath)" "$WRAPDIR/logpath" || mkdir -p "$WRAPDIR" && PREFIX="$WRAPDIR/" scripts/single.sh logpath || exit 1 - echo "$PATH" | tr : '\n' | while read DIR - do - find "$DIR/" -type f,l -maxdepth 1 -executable -exec basename {} \; | \ - while read FILE + find $(tr : '\n' <<< "$PATH") -type f,l -maxdepth 1 -executable \ + -exec basename {} \; | while read FILE do ln -s logpath "$WRAPDIR/$FILE" 2>/dev/null done - done fi # Delete old log (if any) -- 2.39.2