Sample LocaliseDirs script

Every so often people come along wanting to localise (or otherwise change) the names of the /Programs or /System/* directories. We’re not terribly interested in changing our structure, and for the reasons outlined in one of the design documents I don’t think localising them is much use either, but I’ve written a little sample script that does it that somebody could run with if they were motivated.

It is of course fully possible to use whatever structure you like in Gobo – just create symlinks for your new tree, and optionally use `gobohide -h` to make the real versions disappear. That will suffice for those that just want to change the names for no particular reason (though it never seems to placate them…), but it’s clearly too much of a hassle for localisation.

The LocaliseDirs script will parse a simple tab-separated value file mapping the real location to a new name, and create symlinks to implement that vision. It saves a list of the changes it made into /.Localise_Journal, so that they can be reverted without guesswork (LocaliseDirs –reset), and it can use that file to hide/show the real directories (–hide and –show).

That script is unsupported and not a strong candidate for inclusion in the tools any time soon, but it’s there for those that might be interested in using or extending it. It’s mostly a proof-of-concept and demonstration of how you could go about it manually. If you do improve it, please send along the patches — if it gets to the point where it doesn’t have obvious flaws any more it could be merged into Scripts proper eventually.

Leave a Reply