summaryrefslogtreecommitdiff
path: root/cmake/preInstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/preInstall.sh')
-rw-r--r--cmake/preInstall.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh
new file mode 100644
index 0000000..f4a0b65
--- /dev/null
+++ b/cmake/preInstall.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+INSTALL_PREFIX=${RPM_INSTALL_PREFIX}/sapp/
+
+mkdir ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/ -p
+touch ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml
+
+if [[ -z `grep -rn 'dns_decoder' ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml` ]];then
+ echo -e "" >> ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml
+ echo -e "[[plugin]]" >> ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml
+ echo -e "path=\"./stellar_plugin/dns_decoder.so\"" >> ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin//spec.toml
+ echo -e "init=\"dns_decoder_init\"" >> ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml
+ echo -e "exit=\"dns_decoder_exit\"" >> ${RPM_INSTALL_PREFIX}/sapp/stellar_plugin/spec.toml
+fi
+