I'm looking at how to import some third part code into a git repository. The third party code is the "stm32f10x_stdperiph_lib" that is provided by ST.

The lib is actually a bunch of normal c-files (and header-files) that you just include and build with when you do a STM32 project.

The problem is that they only provide it as a zip-file and they do release new versions, so I would like to add more control.

So my plan is to write a little script that does this:

  1. unzip
  2. grab some of the files (I don't need all the files in the zip)
  3. import the selected files into a git repository

My problems start at the last step, how do I import and overwrite the old files with the new ones (and remove files that are no longer included)?

Edit
Report