User:Bugman/subsystems: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎All subsystems: Updated the output to match the newest script.)
m (→‎Script: Pipe fix.)
Line 117: Line 117:
             ctor = "\<%s\>::\<%s\>[ \(]" % (subsystem.name, subsystem.name)
             ctor = "\<%s\>::\<%s\>[ \(]" % (subsystem.name, subsystem.name)
             dtor = "\<%s\>::\~\<%s\>[ \(]" % (subsystem.name, subsystem.name)
             dtor = "\<%s\>::\~\<%s\>[ \(]" % (subsystem.name, subsystem.name)
             grep_ctor = 'grep -rI "%s\|%s"' % (ctor, dtor)
             grep_ctor = 'grep -rI "%s\{{!}}%s"' % (ctor, dtor)


             # The grep command for any function implementation.
             # The grep command for any function implementation.
Line 131: Line 131:
                     cmds = [
                     cmds = [
                         '%s %s' % (grep_ctor, full_path),
                         '%s %s' % (grep_ctor, full_path),
                         '%s %s | grep -v "return"' % (grep_any, full_path)
                         '%s %s {{!}} grep -v "return"' % (grep_any, full_path)
                     ]
                     ]


Line 147: Line 147:
                 cmds = [
                 cmds = [
                     'cd %s; %s' % (path, grep_ctor),
                     'cd %s; %s' % (path, grep_ctor),
                     'cd %s; %s | grep -v "return"' % (path, grep_any)
                     'cd %s; %s {{!}} grep -v "return"' % (path, grep_any)
                 ]
                 ]


Line 293: Line 293:


         # The Unix grep command to run.
         # The Unix grep command to run.
         cmd = 'cd %s; grep -rI %s "public \<%s\>" | grep -v "%s::"' % (path, self.grep_exclude_dir, base_name, base_name)
         cmd = 'cd %s; grep -rI %s "public \<%s\>" {{!}} grep -v "%s::"' % (path, self.grep_exclude_dir, base_name, base_name)
         pipe = Popen(cmd, shell=True, stdout=PIPE)
         pipe = Popen(cmd, shell=True, stdout=PIPE)



Revision as of 19:25, 19 April 2018

Tracking down subsystems

Script

The following script is for finding all FlightGear dependencies:

All subsystems

The result is:

Refactoring

To check that all subsystems on a branch have been updated or refactored: