[openwrt/openwrt] base-files: remove useless cat
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 11 06:52:12 EDT 2020
adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9362ea166168c79cbe8f589073350508e7216876
commit 9362ea166168c79cbe8f589073350508e7216876
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sun May 10 16:47:54 2020 +0200
base-files: remove useless cat
Check file contents directly instead of using cat.
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
package/base-files/files/sbin/pkg_check | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/sbin/pkg_check b/package/base-files/files/sbin/pkg_check
index 775e401b26..28e87925ae 100755
--- a/package/base-files/files/sbin/pkg_check
+++ b/package/base-files/files/sbin/pkg_check
@@ -91,7 +91,7 @@ while [ "$1" ]; do
# Do we have changed files or not?
if [ -z "$ERR" ]; then
- [ $QUIET = yes ] || [ -z "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ] || echo "$CHECK" | sed 's|^| - |'
+ [ $QUIET = yes ] || [ ! -s "/usr/lib/opkg/info/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
[ $QUIET = yes ] || echo " * Package $1 is ok"
[ $QUIET = yes ] || echo
else
More information about the lede-commits
mailing list