Scripts, scripts everywhere

Scripts, scripts everywhere

If you're like me and you run Linux you probably fell in love with bash scripting as soon as you got an idea of how to use it effectively, and probably like me. You have found yourself with a huge collection of bash scripts in various directories on your whole hard drive. (I know people who only use /usr/local/bin, but when you're compiling multiple versions of wine for different games they can't all go there, at least it doesn't seem so) There's also the problem of having multiple copies of the same script in tons of directories and having to update it.


Some of the first problem can be handled with having a script directory in your home directory and using scripts from there. Also using the read command you can make menu driven scripts allowing you to put multiple script functions into one. (Which really you could do for everything if you put enough effort into it and having a good understanding of functions and loading variables) The problem becomes more difficult when trying to deal with scripts that are used by say wine, and need modifying for each application. You end up with a template from the first application you gave it's own directory and wineroot, but then as you add more applications that say need a parametre or two to work with wine. You start ending up with script soup in a lot of cases.

Once again I think using a text file in the applications directory with the settings it uses and having the script be pointed to that directory might be the solution for scripting multiple versions of wine in their own separate directories. As with everything in programming and scripting plan as much as you can, but not too much that you can't start and then try to improve it later.

Mata ne!

Leave a Reply

Your email address will not be published. Required fields are marked *