This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mesa-platform-quic/cmake/preInstall.sh

33 lines
1016 B
Bash

#!/bin/sh
DST=${RPM_INSTALL_PREFIX}
mkdir -p ${DST}/plug/protocol/
touch ${DST}/plug/conflist.inf
mkdir -p ${DST}/etc/
touch ${DST}/etc/entrylist.conf
if [[ -z `grep -rn 'quic.inf' ${DST}/plug/conflist.inf` ]];then
sed -i '/\[protocol\]/a\./plug/protocol/quic/quic.inf' ${DST}/plug/conflist.inf
fi
if [[ -z `grep -rn 'QUIC' ${DST}/etc/entrylist.conf` ]];then
echo "QUIC" >> ${DST}/etc/entrylist.conf
fi
DST=${RPM_INSTALL_PREFIX}/sapp/
mkdir -p ${DST}/stellar_plugin
touch ${DST}/stellar_plugin/spec.toml
if ! grep -q '^\./plug/stellar_plugin/quic.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/quic.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