rocky-tools
rocky-tools copied to clipboard
Add option to set mirror base url for migration
I'll have a closer look at this tomorrow. At first glance it looks to be an absolutely massive patch for such a presumably simple feature request.
That's what I thought when I started, too. Then somehow one thing came after the other. ;)
This patch is a definite -1 from me, I would consider a full rewrite of it but I don't see the need for "mirror file prefix" and "mirror name suffix". A simple baseurl path argument where each repo can be found under a fixed path (or one of two or three different fixed paths) under the prefix should suffice. If that will work for you then I'll work something up.
The script dynamically determines the used repos. So I had thought that a dynamic takeover of the normal repos is a good idea, hence the prefix and suffix. And for the script user I thought it is good to be able to control this and use the files immediately for his environment.
But if you think this is too complex then feel free to implement a simpler variant.
Did you think about the patch or an other variant of it?
This patch is way over-complicated, plus it has a large number of bash coding pitfalls. I will look into writing something more appropriate when I can, but $dayjob takes priority.