4
Sure, anyone can hack up something like this fairly easily, and if someone wants to use this script as a starting point for a similar script for another module, go right ahead.
For anyone attempting this kind of thing, here's the basic structure of the code (though it's so simple, anyone should be able to figure it all out):
1. Grab the command line arguments
2. Setup the variables you need for changing text later on (the names of the template files, etc)
3. Open up the xoops_version.php file and put the contents in a string.
4. Do a series of search and replace operations based on the new names. This is the part that will be unique for each module of course; what you search for will be different.
5. Overwrite the file with the new text you just searched and replaced on.
6. Repeat 3 to 5 for all files in the module that need changing. That's the other part that will be unique for each module -- the number of files that you have the do operations on, and what changes you have to make in them.
7. Rename any files that need renaming. Another unique operation.
They way WF-Channel is cloned here should be a good guide. Here's a good overview of what's required to clone a module:
https://xoops.org/modules/news/article.php?storyid=1714
Good luck!
--Julian