[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/12] gnulib-tool: fall back into copy if symbolic link is n
From: |
Pádraig Brady |
Subject: |
Re: [PATCH 06/12] gnulib-tool: fall back into copy if symbolic link is not supported |
Date: |
Wed, 27 May 2015 14:09:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 27/05/15 13:45, KO Myung-Hun wrote:
> And warn about it.
>
> * gnulib-tool (have_symlink_support): New.
> (symbolic, lsymbolic): Clear on systems not supporting symbolic link.
> ---
> gnulib-tool | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/gnulib-tool b/gnulib-tool
> index 303df53..ce145cb 100755
> --- a/gnulib-tool
> +++ b/gnulib-tool
> @@ -898,6 +898,16 @@ if test "X$1" = "X--no-reexec"; then
> shift
> fi
>
> +# Check if symbolic link is supported
> +have_symlink_support=false
> +rm -f symlink$$.file symlink$$
> +if (echo >symlink$$.file) 2>/dev/null; then
> + if ln -s symlink$$.file symlink$$ 2>/dev/null; then
> + have_symlink_support=true
> + fi
> +fi
> +rm -f symlink$$.file symlink$$
You can just create the symlink to / and avoid the separate symlink$$.file
> +
> # Unset CDPATH. Otherwise, output from 'cd dir' can surprise callers.
> (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
>
> @@ -1355,6 +1365,16 @@ fi
> echo "gnulib-tool: option --conditional-dependencies is not supported
> with --with-tests" 1>&2
> func_exit 1
> fi
> + # Warn if symbolic link is requested on a system not supporting it.
> + # And fall back into copy.
> + if { test -n "$symbolic" || test -n "$lsymbolic" ; } \
> + && ! $have_symlink_support ; then
! test "$have_symlink_support"
- [PATCH] OS/2 patches, KO Myung-Hun, 2015/05/27
- [PATCH 01/12] stdint: check _INTPTR_T_DECLARED before defining intptr_t and uintptr_t, KO Myung-Hun, 2015/05/27
- [PATCH 02/12] binary-io: don't put fd in binary mode if it is a console on EMX, KO Myung-Hun, 2015/05/27
- [PATCH 03/12] pipe-filter-aux: undefine HAVE_SELECT on KLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 05/12] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 04/12] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
- [PATCH 06/12] gnulib-tool: fall back into copy if symbolic link is not supported, KO Myung-Hun, 2015/05/27
- Re: [PATCH 06/12] gnulib-tool: fall back into copy if symbolic link is not supported,
Pádraig Brady <=
- Re: [PATCH 06/12] gnulib-tool: fall back into copy if symbolic link is not supported, Paul Eggert, 2015/05/27
[PATCH 07/12] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2015/05/27
[PATCH 08/12] dup, dup2, fcntl: support a directory fd on OS/2 kLIBC, KO Myung-Hun, 2015/05/27
[PATCH 09/12] opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2015/05/27