Add scripts to apply patches

This commit is contained in:
Sergey Abramchuk
2020-03-04 11:52:03 +03:00
parent e66d4b04a2
commit 1e77a600a4
2 changed files with 56 additions and 0 deletions

19
Scripts/apply_patches.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -e
. functions.sh
ASIO_SRC_DIR="../Sources/ASIO"
ASIO_PATCH_DIR="../Sources/OpenVPN3/deps/asio/patches"
MBEDTLS_SRC_DIR="../Sources/mbedTLS"
MBEDTLS_PATCH_DIR="../Sources/OpenVPN3/deps/mbedtls/patches"
if [ "$1" = "--reverse" ]; then
reverse_patches ${ASIO_SRC_DIR} ${ASIO_PATCH_DIR}
reverse_patches ${MBEDTLS_SRC_DIR} ${MBEDTLS_PATCH_DIR}
else
apply_patches ${ASIO_SRC_DIR} ${ASIO_PATCH_DIR}
apply_patches ${MBEDTLS_SRC_DIR} ${MBEDTLS_PATCH_DIR}
fi