bash: Replace 'cp -d' command with POSIX 'cp -P'

Comment from Eric Blake:

> We don't have any hard-links in our source. GNU cp -d is the same as
> cp -P --preserve=links, but --preserve=links only matters for hard
> links, so losing it doesn't hurt our usage. I'm inclined to just go
> with cp -P unconditionally rather than needing the configure.ac
> logic for $(CP_D).

Fixes: https://github.com/libguestfs/libguestfs/issues/183
Reported-by: Mohamed Akram
Thanks: Eric Blake
This commit is contained in:
Richard W.M. Jones
2025-04-22 11:42:46 +01:00
committed by rwmjones
parent 166395914f
commit e49d65a5fd

View File

@@ -57,7 +57,7 @@ all-local: $(scripts) $(symlinks)
install-data-local:
$(mkdir_p) $(DESTDIR)$(bashcompletiondir)
cp -d $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir)
cp -P $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir)
clean-local:
-test $(srcdir) != $(builddir) && rm -f $(scripts)