summaryrefslogtreecommitdiff
path: root/cmake/preInstall.sh
blob: 9c53f3db95d758c0f0c588531a92b38b72793ca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
DST=${RPM_INSTALL_PREFIX}/sapp/

mkdir -p ${DST}/stellar_plugin
touch ${DST}/stellar_plugin/spec.toml

if ! grep -q '^\./stellar_plugin/quic_decoder.so' "${DST}/stellar_plugin/spec.toml"; then
    echo -e "\n" >> "${DST}/stellar_plugin/spec.toml"
    echo -e "[[plugin]]" >> "${DST}/stellar_plugin/spec.toml"
    echo -e "path = \"./stellar_plugin/quic_decoder.so\"" >> "${DST}/stellar_plugin/spec.toml"
    echo -e "init = \"QUIC_ONLOAD\"" >> "${DST}/stellar_plugin/spec.toml"
    echo -e "exit = \"QUIC_UNLOAD\"" >> "${DST}/stellar_plugin/spec.toml"
    echo -e "\n" >> "${DST}/stellar_plugin/spec.toml"
fi