freifunk-berlin / falter-builter

build falter images using precompiled openwrt imagebuilders.
6 stars 6 forks source link

Check whether a patch has already been applied #75

Closed khanku closed 3 years ago

khanku commented 3 years ago

This adds a patch_if_needed function to build_falter which will check if a patch has already been applied and then apply it only if necessary. See #74.

Tested with:

./build_falter -p packageset/21.02/tunneldigger.txt -v 1.2.0-snapshot -t ipq40xx -s mikrotik
[...]
patching file scripts/json_overview_image_info.py
patching file include/image-commands.mk
[...]

and:

./build_falter -p packageset/21.02/tunneldigger.txt -v snapshot -t ipq40xx -s mikrotik
[...]
patching file scripts/json_overview_image_info.py
[...]

Note that the second invocation only patches scripts/json_overview_image_info.py: this is because the other patch has made it in upstream's snapshot version.