gobolinux / Scripts

The GoboLinux scripts collection
41 stars 9 forks source link

`ListProgramFiles`: Do not list links with the `--files` option #47

Closed Nuc1eoN closed 1 week ago

Nuc1eoN commented 1 week ago

Calling ListProgramFiles --files will now omit links in its output. If we desire to include links we can call ListProgramFiles --files --links instead. I believe this adds more flexibity to the tool.

@hishamhm looks like you are the original author of ListProgramFiles! Would you be in favor of this change?

The benefit is, that we can now list program files excluding links - and that was not possible before. Moreover no functionality is lost with this change.

I came up with this change because I experimented with some bash scripting on GoboLinux and wanted to list the program files without internal links. Even though (as of now) I do not need this functionality anymore, I think this could still be useful! :)

Small disclaimer: I have searched through the repos to make sure ListProgramFiles --files isn't being used in a gobolinux script, as this could affect the results. I haven't found any, so this should be safe to merge. For reference: https://github.com/search?q=org%3Agobolinux%20ListProgramFiles&type=code

hishamhm commented 1 week ago

My only concern would be if this was being used elsewhere and the change broke behavior in some of the other existing scripts. But from a quick grep through the Scripts, Compile and Installer repos, I do see ListProgramFiles being called, but never with the --files option. So it should be fine to make the change!

Nuc1eoN commented 1 week ago

My only concern would be if this was being used elsewhere and the change broke behavior in some of the other existing scripts. But from a quick grep through the Scripts, Compile and Installer repos, I do see ListProgramFiles being called, but never with the --files option.

Thanks for checking! Yeah, neither did I find it being used anywhere with the --files option.

So it should be fine to make the change!

Nice thanks! :)

Merging.