Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > b27dd7e2168c6ae0c3da9105ef3f5f82 > files > 6

fdupes-1.51-5.mga5.src.rpm

%fdupes(s) \
 _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" "$_file"; \
      fi ;\
    fi ; \
 done \
%{nil}