1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00
cde/bin/ignore
Martijn Dekker 9b45f2ccbe build system: modernise shell compatibility checks
All changed files:
- Put the shell in POSIX mode if it has an '-o posix' option.
- Remove nonsense disabling 'set -x' on bash. It's not broken.

bin/package, src/cmd/INIT/package.sh:
- Add check blocking native zsh mode (e.g., "$path" conflicts).
  Using a 'sh -> zsh' symlink works, so recommend that.
- Remove old ksh93 version check for a supposed conflict with
  libcmd. It was broken; it would revert to /bin/sh, but on illumos
  distributions, /bin/sh is a ksh93 of a version that is supposedly
  affected. It builds fine anyway.
- Rewrite checksh() to incorporate the shell compatibility checks
  that were previously in two different places in 'package'.

bin/ignore, src/cmd/INIT/ignore.sh,
bin/silent, src/cmd/INIT/silent.sh:
- Change bad check for a full POSIX 'export' command (no, $RANDOM
  has nothing to do with that) with a proper feature test.
2020-08-23 23:41:31 +01:00

42 lines
1.8 KiB
Text
Executable file

########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1994-2011 AT&T Intellectual Property #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
# http://www.eclipse.org/org/documents/epl-v10.html #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
# Florham Park NJ #
# #
# Glenn Fowler <gsf@research.att.com> #
# #
########################################################################
# non-ksh script for the nmake ignore prefix
# @(#)ignore (AT&T Research) 1992-08-11
(set -o posix) 2>/dev/null && set -o posix
modern_export=`v=; export v=ok 2>/dev/null; echo "$v"`
while :
do case $# in
0) exit 0 ;;
esac
case $1 in
*=*) case $modern_export in
ok) export "$1" ;;
*) `echo $1 | sed "s/\\([^=]*\\)=\\(.*\\)/eval \\1='\\2'; export \\1/"` ;;
esac
shift
;;
*) break
;;
esac
done
"$@"
exit 0