[systemd-devel] [PATCH 1/2] configure.ac: strip off trailing slashed from $rootprefix
Mike Gilbert
floppym at gentoo.org
Fri May 29 23:50:11 PDT 2015
On Fri, May 29, 2015 at 8:05 PM, Daniel Mack <daniel at zonque.org> wrote:
> Make sure the variable set via --with-rootprefix= does not contain a
> trailing slash, so man pages can use entities like "&rootprefix;/lib"
> without ending up having double slashes.
> ---
> configure.ac | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 92654a6..55b73de 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1396,7 +1396,8 @@ AC_ARG_WITH([zshcompletiondir],
>
> AC_ARG_WITH([rootprefix],
> AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
> - [], [with_rootprefix=${ac_default_prefix}])
> + [with_rootprefix=`echo ${withval} | sed -e s,/*$,,`],
> + [with_rootprefix=${ac_default_prefix}])
Why do you pipe it through sed when a simple shell parameter expansion would do?
with_rootprefix=${withval%/}
More information about the systemd-devel
mailing list