If you have your own TCL mirror, it can be laborious to add a custom extension (or upgrade existing custom extension) on it because of all the metadata files that need to be edited.
I wrote the attached script for my own use to accomplish the above. It assumes that you have control over the TCL mirror and that the server hosting the mirror is both an http server and an ssh server.
To use the script, edit the two sections at the top ("user variables" and "ssh credentials" **), put the script somewhere in your local machine's PATH, and make the script executable. Then just follow these directions:
1. Inside local machine's working_dir (e.g., $HOME/Downloads), create an empty directory named foo (i.e., if custom extension is foo.tcz, you now have the empty directory $HOME/Downloads/foo)
2. Put foo.tcz and foo.tcz.info (and, if applicable, foo.tcz.dep) inside $working_dir/foo
3. $ cd $working_dir/foo; submitqc # now you should have 6 files in directory foo (5 if there is no .dep file)
4. $ upload-tcz foo
Done!
I hope this helps someone. I was in need of something like this for a long time before I finally pulled up my sleeves and put this together. If you see any obvious ways to improve the script, please let me know.
** I connect to my ssh server using public key authentication. This is not necessary, of course. If you use password authentication, just edit the ssh command accordingly.