Re: [PATCH] tests: add compatibility layer

Subject: Re: [PATCH] tests: add compatibility layer

Date: Wed, 21 Dec 2016 07:24:45 +0900

To: mp39590@gmail.com, notmuch@notmuchmail.org

Cc:

From: David Bremner


mp39590@gmail.com writes:

>  
> +# OS independent functions
> +#
> +# Alias native BSD utilities to usable GNU equivalents.
> +case `uname` in
> +FreeBSD)
> +	# allow using aliases in scripts
> +	shopt -s expand_aliases
> +
> +	alias date=gdate
> +	alias base64=gbase64
> +	alias gdb=$BSD_GDB
> +	alias wc=gwc
> +	alias sed="gsed"
> +	alias sha256sum=gsha256sum
> +	;;
> +esac
> +

What about adding (most of) this to sh.config by the configure script?
I'd like to centralize all hacky platform detection there.

Also, why is gsed in quotes but none of the others are?

Thread: