I worked on the same idea, may I provide you my code?
It's used by passing the path of the (txt) archive, then the path of all the files to add
If the archive is missing, it writes all the files into a new txt file with an unused String between the content in order to get back the name of the file
If the archive is present, it creates a folder with the name of the archive (in order to avoid overwriting a cluttered folder) and writes the file with the appropriate name into such folder
It's really likely the script doesn't handle error cases correctly, but it works in ideal cases, so it can at least be a way to transmit a lot of source files in one download
In practice:
Let's assume the terminal is in a folder containing several source files, including "sourceA" and "source4"
"archive test sourceA.src source4.src" creates a test.tar with "#archive sourceA.src" followed by its text, then "#archive source4.src" then its text
Launching "archive test sourceA.src source4.src" makes a /test/ folder with sourceA.src and source4.src in it
NB : My source code was intended to be used with my preprocessor, but I added fallback methods to make it work with the standard build command. My fallback methods are rather silly because I didn't want to leak all my utility methods for now, but the script will work fine as-is.