Merge all Yara rules from a Yara github repository in one .yar file

There is an index file in the official Yara rules repository git hub. This one :

I want to create a script in bash or other language able to merge all yara files in a .yar (like the index.yar) that include all my yara files. I can do it manually but the problem is that there are too many rules to write it down manually in the script.

For instance this repository : I don’t really know how to create a file that create a yara file that include all these yara rules from the repository

Thanks in advance for all your help, I appreciate.