The attached patch fixes an annoyance similar to the one fixed by commit d5ac4d52411459192ee59a98cf1344f6eac17f33.

Ken
From 73967133995ffcb0e474f40171d2c1079f54d3fa Mon Sep 17 00:00:00 2001
From: Ken Brown <[email protected]>
Date: Fri, 5 May 2017 15:00:02 -0400
Subject: [PATCH] texlive: avoid bash warnings

Remove NUL bytes from the output of 'head' commands.
---
 cygclass/texlive.cygclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass
index ce247e4..6e43125 100644
--- a/cygclass/texlive.cygclass
+++ b/cygclass/texlive.cygclass
@@ -202,7 +202,7 @@ texlive_install() {
                        *)      continue ;;
                        esac
 
-                       if [ "$(head -c 2 $src)" = '#!' -o "$(head -c 4 $src)" 
= 'eval' ]
+                       if [ "$(head -c 2 $src | tr -d '\0')" = '#!' -o "$(head 
-c 4 $src | tr -d '\0')" = 'eval' ]
                        then
                                perm=755
                        else
-- 
2.12.2

Reply via email to