jdeb icon indicating copy to clipboard operation
jdeb copied to clipboard

Suggestion: implement "rules"

Open Sami32 opened this issue 7 years ago • 1 comments

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>

Sami32 avatar Aug 28 '18 00:08 Sami32

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.

tcurdt avatar Aug 28 '18 00:08 tcurdt