sed all asn1c header to dir local include

This commit is contained in:
estkme 2023-10-10 23:07:35 +08:00
parent 63b564022a
commit 1293c3d932

View file

@ -1 +1,3 @@
asn1c -fwide-types -fcompound-names -fincludes-quoted -no-gen-example asn1/PKIXExplicit88.asn asn1/PKIXImplicit88.asn asn1/rsp.asn
asn1c -fwide-types -fcompound-names -fincludes-quoted -no-gen-example ../../../asn1/PKIXExplicit88.asn ../../../asn1/PKIXImplicit88.asn ../../../asn1/rsp.asn
find "." -type f \( -name "*.c" -o -name "*.h" \) | while read -r file; do for header in $(find "." -type f -name "*.h"); do header_file=$(basename "$header"); sed -i "/#include <${header_file}>/c\#include \"${header_file}\"" "$file"; done; done