WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: script to add extension to your own TCL mirror  (Read 344 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 819
script to add extension to your own TCL mirror
« on: October 24, 2021, 01:17:14 PM »
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

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.
« Last Edit: October 24, 2021, 01:25:28 PM by GNUser »

Offline mocore

  • Sr. Member
  • ****
  • Posts: 317
  • ~.~
Re: script to add extension to your own TCL mirror
« Reply #1 on: January 21, 2022, 01:36:12 AM »
thanks for posting this intresting script

i just happens that while searching the forum
i found the below *apparently(i dint scroll the whole thread to chk)* un answered request for tcz-repo scripts

-Please GPL the backend CGI scripts that Tiny Core uses.  This would allow the community to make suggestions/improvements and better understand how everything works.  This would also allow people who setup their own tcz repository to run the CGI's on their own server so that their Tiny Core systems wouldn't need to have direct internet access for the appbrowser to work.   Plus, in my opinion anyway, opening up the backend code of a GPL project is the right thing to do (that's just me though, and is coming from a card carrying member of the Free Software Foundation..  :) )