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 : https://github.com/Yara-Rules/rules/blob/master/index.yar

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 : https://github.com/citizenlab/malware-signatures/tree/master/malware-families 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.