SHA256
1
0
forked from pool/fdupes
OBS User unknown 2007-09-13 16:41:20 +00:00 committed by Git OBS Bridge
parent a85915a780
commit 9c3fe56e51
3 changed files with 32 additions and 11 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Sep 6 18:41:37 CEST 2007 - mls@suse.de
- do not hardlink empty files in %fdupes macro
-------------------------------------------------------------------
Wed Sep 5 15:44:52 CEST 2007 - nadvornik@suse.cz
- support filenames with spaces in %fdupes macro [#307727]
-------------------------------------------------------------------
Tue May 15 22:53:03 CEST 2007 - coolo@suse.de

View File

@ -15,7 +15,7 @@ URL: http://premium.caribe.net/~adrian2/fdupes.html
Group: Productivity/Archiving/Compression
Summary: Identifying or deleting duplicate files
Version: 1.40
Release: 19
Release: 42
License: X11/MIT
Source0: %name-%{version}.tar.bz2
Source1: macros.fdupes
@ -55,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT
/etc/rpm
%changelog
* Thu Sep 06 2007 - mls@suse.de
- do not hardlink empty files in %%fdupes macro
* Wed Sep 05 2007 - nadvornik@suse.cz
- support filenames with spaces in %%fdupes macro [#307727]
* Tue May 15 2007 - coolo@suse.de
- add an RPM macro to make use of it in spec files
* Thu Nov 16 2006 - dmueller@suse.de

View File

@ -1,16 +1,23 @@
%fdupes(s) \
symlinks=0; \
%{-s:symlinks=1;} \
fdupes -q -r -1 %1 | \
while read target rest; do \
for f in $rest; do \
if test "$symlinks" = 1; then \
ln -sf "${target/$RPM_BUILD_ROOT/}" "$f"; \
_target=""; \
_symlinks=0; \
%{-s:_symlinks=1;} \
fdupes -q -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" "$f"; \
ln -f "$_target" "$_file"; \
fi ;\
done ;\
done \
fi ; \
done \
%{nil}