From 23216853d6d2cd768fdeca7ab72d3a300465981d Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 13 Apr 2019 17:37:30 -0300 Subject: [PATCH] 00-patches.sh: avoid useless use of cat --- common/hooks/do-patch/00-patches.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/hooks/do-patch/00-patches.sh b/common/hooks/do-patch/00-patches.sh index b3b94c25c6c..64e934c3981 100644 --- a/common/hooks/do-patch/00-patches.sh +++ b/common/hooks/do-patch/00-patches.sh @@ -7,7 +7,7 @@ _process_patch() { _patch=${i##*/} if [ -f $PATCHESDIR/${_patch}.args ]; then - _args=$(cat $PATCHESDIR/${_patch}.args) + _args=$(<$PATCHESDIR/${_patch}.args) elif [ -n "$patch_args" ]; then _args=$patch_args fi @@ -39,9 +39,9 @@ hook() { return 0 fi if [ -r $PATCHESDIR/series ]; then - cat $PATCHESDIR/series | while read f; do + while read -r f; do _process_patch "$PATCHESDIR/$f" - done + done < $PATCHESDIR/series else for f in $PATCHESDIR/*; do [ ! -f $f ] && continue