You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
444 B
22 lines
444 B
13 years ago
|
%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}
|