| 
            Last change
 on this file was             3613, checked in by bird, 14 months ago           | 
        
        
          | 
             
src/sed: Merged in changes between 4.1.5 and 4.9 from the vendor branch. (svn merge /vendor/sed/4.1.5 /vendor/sed/current .) 
 
           | 
        
        
          | 
            File size:
            1.4 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | # -*- sh -*-
 | 
|---|
| 2 | # Check environment variables for sane values while testing.
 | 
|---|
| 3 | 
 | 
|---|
| 4 | # Copyright (C) 2000-2022 Free Software Foundation, Inc.
 | 
|---|
| 5 | 
 | 
|---|
| 6 | # This program is free software: you can redistribute it and/or modify
 | 
|---|
| 7 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 8 | # the Free Software Foundation, either version 3 of the License, or
 | 
|---|
| 9 | # (at your option) any later version.
 | 
|---|
| 10 | 
 | 
|---|
| 11 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 14 | # GNU General Public License for more details.
 | 
|---|
| 15 | 
 | 
|---|
| 16 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 17 | # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
|---|
| 18 | 
 | 
|---|
| 19 | if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
 | 
|---|
| 20 |   as_unset=unset
 | 
|---|
| 21 | else
 | 
|---|
| 22 |   as_unset=false
 | 
|---|
| 23 | fi
 | 
|---|
| 24 | 
 | 
|---|
| 25 | envvar_check_fail=0
 | 
|---|
| 26 | vars='
 | 
|---|
| 27 |   _POSIX2_VERSION
 | 
|---|
| 28 |   _STDBUF_E
 | 
|---|
| 29 |   _STDBUF_I
 | 
|---|
| 30 |   _STDBUF_O
 | 
|---|
| 31 |   BASH_ENV
 | 
|---|
| 32 |   BLOCKSIZE
 | 
|---|
| 33 |   BLOCK_SIZE
 | 
|---|
| 34 |   CDPATH
 | 
|---|
| 35 |   COLS
 | 
|---|
| 36 |   COLUMNS
 | 
|---|
| 37 |   DF_BLOCK_SIZE
 | 
|---|
| 38 |   DU_BLOCK_SIZE
 | 
|---|
| 39 |   ENV
 | 
|---|
| 40 |   LANGUAGE
 | 
|---|
| 41 |   LS_BLOCK_SIZE
 | 
|---|
| 42 |   LS_COLORS
 | 
|---|
| 43 |   OMP_NUM_THREADS
 | 
|---|
| 44 |   POSIXLY_CORRECT
 | 
|---|
| 45 |   QUOTING_STYLE
 | 
|---|
| 46 |   SIMPLE_BACKUP_SUFFIX
 | 
|---|
| 47 |   TABSIZE
 | 
|---|
| 48 |   TERM
 | 
|---|
| 49 |   COLORTERM
 | 
|---|
| 50 |   TIME_STYLE
 | 
|---|
| 51 |   TMPDIR
 | 
|---|
| 52 |   VERSION_CONTROL
 | 
|---|
| 53 | '
 | 
|---|
| 54 | for var in $vars
 | 
|---|
| 55 | do
 | 
|---|
| 56 |   $as_unset $var
 | 
|---|
| 57 |   if eval test \"\${$var+set}\" = set; then
 | 
|---|
| 58 |     echo "$0: the $var environment variable is set --" \
 | 
|---|
| 59 |       ' unset it and rerun this test' >&2
 | 
|---|
| 60 |     envvar_check_fail=1
 | 
|---|
| 61 |   fi
 | 
|---|
| 62 | done
 | 
|---|
| 63 | 
 | 
|---|
| 64 | test "$envvar_check_fail" = 1 && exit 1
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.