[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash-term-in-posix-shell '$OSTYPE'
From: |
Gavin Smith |
Subject: |
Re: bash-term-in-posix-shell '$OSTYPE' |
Date: |
Sat, 31 Dec 2022 13:45:49 +0000 |
On Sat, Dec 31, 2022 at 12:15:54AM +0100, Hilmar Preuße wrote:
> Hello,
>
> last report for this year.
>
> The lintian checker reports that the script usr/bin/texi2dvi contains a
> bashism, although it is considered to be a bourne shell script. This is
> seconded by the shellcheck tool, which reports:
>
> In /home/hille/devel/TeXLive/github/texinfo/util/texi2dvi line 85:
> && test "$OSTYPE" != msys ; then
> ^-----^ SC3028 (warning): In POSIX sh, OSTYPE is undefined.
>
> Thanks and happy new year!
>
> Hilmar
The test is to stop the search path separator being set to ; on Msys, rather
than :.
I think we should wait for a report from an Msys or Msys2 user. The effect
of these environment variables on different systems appears fiddly and hard
to understand. OSTYPE has been long used in this script for Msys, since
2015, and there is no apparent need to change it:
https://lists.gnu.org/archive/html/bug-texinfo/2015-09/msg00079.html
According to this message in a discussion on this code,
https://lists.gnu.org/archive/html/bug-texinfo/2022-04/msg00016.html
it is usual to use OSTYPE for this purpose for Msys.