make.sh: Suppress 'ls :cannot access *.bz2'-message

Message ID 20200524221350.17476-1-matthias.fischer@ipfire.org
State Accepted
Commit 5336aaa6fa24092ad3ea392516a52633a7278a31
Headers
Series make.sh: Suppress 'ls :cannot access *.bz2'-message |

Commit Message

Matthias Fischer May 24, 2020, 10:13 p.m. UTC
  The message "ls: cannot access '*.bz2': No such file or directory" comes
from the 'ls' command prior to creating the *.md5-files for *.bz2, *.img.xz
and *.iso files.

But on most builds we have especially no more bzip2 compressed images anymore.

This message can usually be ignored and is just irritating.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
---
 make.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer May 25, 2020, 9:26 a.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 24 May 2020, at 23:13, Matthias Fischer <matthias.fischer@ipfire.org> wrote:
> 
> The message "ls: cannot access '*.bz2': No such file or directory" comes
> from the 'ls' command prior to creating the *.md5-files for *.bz2, *.img.xz
> and *.iso files.
> 
> But on most builds we have especially no more bzip2 compressed images anymore.
> 
> This message can usually be ignored and is just irritating.
> 
> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
> ---
> make.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/make.sh b/make.sh
> index 4acce807f..2e8faa38d 100755
> --- a/make.sh
> +++ b/make.sh
> @@ -1707,7 +1707,7 @@ buildpackages() {
>   # remove not useable iso on armv5tel (needed to build flash images)
>   [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
> 
> -  for i in `ls *.bz2 *.img.xz *.iso`; do
> +  for i in $(ls *.bz2 *.img.xz *.iso 2>/dev/null); do
> 	md5sum $i > $i.md5
>   done
>   cd $PWD
> -- 
> 2.18.0
>
  

Patch

diff --git a/make.sh b/make.sh
index 4acce807f..2e8faa38d 100755
--- a/make.sh
+++ b/make.sh
@@ -1707,7 +1707,7 @@  buildpackages() {
   # remove not useable iso on armv5tel (needed to build flash images)
   [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
 
-  for i in `ls *.bz2 *.img.xz *.iso`; do
+  for i in $(ls *.bz2 *.img.xz *.iso 2>/dev/null); do
 	md5sum $i > $i.md5
   done
   cd $PWD