forked from pool/fdupes
- Refresh patches: * fdupes-makefile.patch * 0008-speedup-the-file-compare.patch * 0010-add-permissions-mode.patch * 0011-add-an-option-to-sort-duplicate-files-by-name.patch * 50_bts284274_hardlinkreplace.dpatch - Upstreamed patch: * 0004-Large-file-support-for-2GB-files-bts447601.patch - Remove whitespace from fdupes.macros file - Cleanup with spec-cleaner - Obey rpm-opt-flags - run test phase OBS-URL: https://build.opensuse.org/package/show/utilities/fdupes?expand=0&rev=12
22 lines
455 B
Plaintext
22 lines
455 B
Plaintext
%fdupes(s) \
|
|
_target=""; \
|
|
_symlinks=0; \
|
|
%{-s:_symlinks=1;} \
|
|
fdupes -q -p -n -o name -r %1 | \
|
|
while read _file; do \
|
|
if test -z "$_target" ; then \
|
|
_target="$_file"; \
|
|
else \
|
|
if test -z "$_file" ; then \
|
|
_target=""; \
|
|
continue ; \
|
|
fi ; \
|
|
if test "$_symlinks" = 1; then \
|
|
ln -sf "${_target#%{buildroot}}" "$_file"; \
|
|
else \
|
|
ln -f "$_target" "$_file"; \
|
|
fi ;\
|
|
fi ; \
|
|
done \
|
|
%{nil}
|