- if ($0 !~ /defattr/) # If no %defattr
- print "%defattr(644,root,root,755)" # Add it
- else
- $0 = "%defattr(644,root,root,755)" # Correct mistakes (if any)
+ if (ENVIRON["SKIP_DEFATTR"] != 1) {
+ if ($0 !~ /defattr/) { # If no %defattr
+ print "%defattr(644,root,root,755)" # Add it
+ } else {
+ $0 = "%defattr(644,root,root,755)" # Correct mistakes (if any)
+ }
+ }