RetroPie / RetroPie-Setup

Shell script to set up a Raspberry Pi/Odroid/PC with RetroArch emulator and various cores
Other
10.04k stars 1.38k forks source link

skyscraper - change location of deployed bash completion file #3872

Closed s1eve-mcdichae1 closed 7 months ago

s1eve-mcdichae1 commented 7 months ago

Ref: https://serverfault.com/a/1013395

cmitu commented 7 months ago

How about copying it directly into /etc/bash_completion.d, it's easier to manage and we get the same result.

s1eve-mcdichae1 commented 7 months ago

Yes this works as well. I suppose we don't need to chown the file here. Do we ever need to make the directory first or will that always exist?

joolswills commented 7 months ago

Thanks. If someone updates they will be left with the old file so maybe a good idea to delete the old location during install.

cmitu commented 7 months ago

Yes this works as well. I suppose we don't need to chown the file here.

No.

Do we ever need to make the directory first or will that always exist?

In theory, yes, but in practice without bash-completion installed (which creates the folder) it won't work anyway. Let's not bother with the creation, but you can add a check to skip the completion file installation if the folder is missing.

s1eve-mcdichae1 commented 7 months ago

Thanks. If someone updates they will be left with the old file so maybe a good idea to delete the old location during install.

Do you want to remove the directory too, or just the file?

cmitu commented 7 months ago

Do you want to remove the directory too, or just the file?

I think we want just the file.

joolswills commented 7 months ago

Thanks for this - however I decided to merge https://github.com/RetroPie/RetroPie-Setup/pull/3875 which includes this but also has another change.