chilcote / outset

Automatically process packages, profiles, and scripts during boot, login, or on demand.
572 stars 58 forks source link

Feature Request: recurse Outset directories #41

Closed orbsmiv closed 7 years ago

orbsmiv commented 7 years ago

Have you considered using e.g. os.path.walk instead of os.listdir in the _processitems function? For organisation of the scripts, particularly those which run regularly, it would be helpful if Outset could recurse subdirectories so that, for example, all scripts relating to a given application could be collated.

chilcote commented 7 years ago

Sounds good to me. I'll put something together soon.

chilcote commented 7 years ago

Please try https://github.com/chilcote/outset/tree/recursive_walk and let me know if that does what you expect.

orbsmiv commented 7 years ago

Implementation looks good although I'm on leave until Friday so not in a position to check on work's systems. One small (possibly inaccurate!) observation... is os.path.join in line 250 now unnecessary given that the walk produces absolute paths?

chilcote commented 7 years ago

Nope I think you are correct. Nice catch. I updated the branch.

orbsmiv commented 7 years ago

Finally managed to test this and it works great, thanks!

chilcote commented 7 years ago

Right on, thank you.