Mercurial > octave
diff libinterp/mk-pkg-add.sh @ 23877:95797733d539
maint: set build environment safely for consistent sorting
* libinterp/mk-pkg-add.sh: Set LC_ALL=C instead of LC_COLLATE to ensure
consistent sorting. Pattern borrowed from libinterp/mk-build-env-features.sh.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 10 Aug 2017 16:10:10 -0700 |
parents | 3b68aeeabc40 |
children | 194eb4bd202b |
line wrap: on
line diff
--- a/libinterp/mk-pkg-add.sh Thu Aug 10 18:03:58 2017 -0400 +++ b/libinterp/mk-pkg-add.sh Thu Aug 10 16:10:10 2017 -0700 @@ -18,6 +18,10 @@ # along with Octave; see the file COPYING. If not, see # <http://www.gnu.org/licenses/>. +## Attempt to get traditional sort behavior based on byte values. +LC_ALL=C +export LC_ALL + set -e SED=${SED:-sed} @@ -36,7 +40,7 @@ base=`basename "$src_file" | $SED 's/\.cc$//'` fcns=`$SED -n -e 's/^ *DEFUN_DLD *( *\([^, ]*\) *,.*$/\1/p' \ -e 's/^ *DEFUNX_DLD *( *"\([^"]*\)".*$/\1/p' "$src_file" | \ - LC_COLLATE=C sort -u` + sort -u` if [ -n "$fcns" ]; then for n in $fcns; do if [ "$n" = "$base" ]; then