jdeb
jdeb copied to clipboard
Suggestion: implement "rules"
That should make the code much simpler and shorter on complex packages IMO.
<rulesets>
<ruleset>
<id>Default-settings</id>
<rules>
<rule>
<user>root</user>
<group>root</group>
</rule>
<rule>
<when>
<type>directory</type>
</when>
<mode>0755</mode>
</rule>
<rule>
<when>
<type>file</type>
</when>
<mode>0644</mode>
</rule>
<rule>
<when>
<type>directory</type>
<suffix>documentation</suffix>
</when>
<documentation>true</documentation>
</rule>
<file>
<when>
<suffix>README.txt</suffix>
</when>
<readme>true</readme>
</file>
<file>
<when>
<type>file</type>
<suffix>.sh</suffix>
</when>
<mode>0755</mode>
</file>
</rules>
</ruleset>
</rulesets>
Which code?
I fear this new approach is out of scope for the 1.x branch. And I am not such a great fan of adding a rules engine to approach this - but have a look at #195.