Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 35d87ddbc62704f26bf97feb25ea5889 > files > 1

fdupes-1.6.1-3.mga7.i586.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}