Found with shellcheck.

Signed-off-by: Rosen Penev <[email protected]>
---
 scripts/clean-package.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index e849c41afa..b64d7ad21a 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -8,13 +8,13 @@ IFS=$'\n'
        echo "File/directory not found"
        exit 1
 }
-cat "$1" | (
+(
        cd "$2" || exit 1
        while read -r entry; do
                [ -n "$entry" ] || break
                [ -f "$entry" ] && rm -f $entry
        done
-)
+) < "$1"
 sort -r "$1" | (
        cd "$2" || exit 1
        while read -r entry; do
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to