wimpysworld / desktopify

Convert Ubuntu Server for Raspberry Pi into a Desktop
https://www.youtube.com/watch?v=umtZuUJOU38
MIT License
520 stars 89 forks source link

Codename check: use Case instead of Ifs #67

Closed teward closed 2 years ago

teward commented 3 years ago

Case conditionals are more expandable for multiple string matches and in the long term for future version support will greatly reduce the codename checks - it's easier to simply add a codename to the case list than to add multiple if checks in a way that ShellCheck will accept. This allows easy adding of any future codename to the supported list without needing to duplicate the if checks for future version matches in a way that Shellcheck would complain about.

teward commented 3 years ago

Dependent on #69 in order to get the shellcheck bits to fix themselves.