Add dtb_selector_bash.sh for Linux Users#191
Add dtb_selector_bash.sh for Linux Users#191Juliancillo1310 wants to merge 1 commit intolcdyk0517:mainfrom
Conversation
|
Your idea is to use a shell script for copying on Linux, right? It would be better to modify it so that the shell script is generated based on Go code. Otherwise, adding a new model would require maintaining two separate places. |
|
Yeah the idea is to use a shell script using basic commands that all distros have, even the ones that are barebones. The idea is to maximize compatibility on every distro. At the start of the script there is a variable called "consoles" that can be modified in the future whenever a new console is added with the path of all the files necessary for it to run and should not need any other intervention |
|
If I add new machines in the future, I’ll have to modify the .go code and dtb_selector_bash.sh, which currently requires changes in two different places. This is quite inconvenient from a maintenance perspective. |
|
Maybe I can make the script read the table from the readme and with that you shouldn't have to modify 2 scripts |
|
It would be best to modify build_dtb_selector.sh to generate dtb_selector_bash.sh. |
|
Yeah that could be the solution |
|
I think the best solution for this is to separate the data from the Go program into, let’s say, a JSON file. Then, moving forward, we won’t need to recompile the Go program every time. We can just add new devices by modifying the JSON file. This also allows us to generate a Linux script from the same JSON using |
|
I don't know if it would be interesting. But I developed a Python version of dtb_selector for my personal use. I'm also a Linux user. A small drawback would be the issue of permissions for executing .sh files on a FAT32 partition. I believe I wouldn't face this problem using Python. And since this is something that comes pre-installed in most distributions, I took the opportunity to include Portuguese (Brazil) support. To facilitate maintenance, I also separated the list of consoles into a JSON file. |
|
I tried to develop this version in a way that it works on both Linux and Windows. Since I don't have a Windows machine to test it on here, I can't guarantee stability. But I noticed the previous comment mentioning the separation of code logic from the console list and remembered that I had already implemented this optimization. |
|
Works exe with WINE. |
bc8e095 to
d42b67a
Compare






Created a bash script that copies the the dtbs, logo and Image file for each console