forked from pool/fdupes
- update to 1.5.0-PR2 * new "--summarize" option * new "--recurse:" selective recursion option * new "--noprompt" option for totally automated deletion of duplicate files. * sorts duplicates (old to new) for consistent order when listing or deleteing duplicate files. * tests for early matching of files, which should help speed up the matching process when large files are involved. * warns whenever a file cannot be deleted. * bugfixes (proper file closing, zero-length files, ...) - add -p/--permissions switch so files with different permissions or uid/gid are not considered as duplicates (bnc#784670) * this mode is a default one for fdupes macro - refresh all patches - drop the fdupes-sort-output.diff - use the upstream mtime sorting - add the debian patches - see spec file for details OBS-URL: https://build.opensuse.org/request/show/138346 OBS-URL: https://build.opensuse.org/package/show/utilities/fdupes?expand=0&rev=6
24 lines
449 B
Plaintext
24 lines
449 B
Plaintext
|
|
%fdupes(s) \
|
|
_target=""; \
|
|
_symlinks=0; \
|
|
%{-s:_symlinks=1;} \
|
|
fdupes -q -p -n -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}
|
|
|