projects
/
openwrt
/
staging
/
wigyori.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b837216
)
base-files: remove useless cat
author
Adrian Schmutzler
<
[email protected]
>
Sun, 10 May 2020 14:47:54 +0000
(16:47 +0200)
committer
Adrian Schmutzler
<
[email protected]
>
Sat, 11 Jul 2020 10:52:01 +0000
(12:52 +0200)
Check file contents directly instead of using cat.
Signed-off-by: Adrian Schmutzler <
[email protected]
>
package/base-files/files/sbin/pkg_check
patch
|
blob
|
history
diff --git
a/package/base-files/files/sbin/pkg_check
b/package/base-files/files/sbin/pkg_check
index 775e401b266db953b441413a6b908d4f3a934261..28e87925aefd476dea7e3accfb0b23eed85eead2 100755
(executable)
--- 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