summaryrefslogtreecommitdiff
path: root/cmake/preInstall.sh
diff options
context:
space:
mode:
author刘学利 <[email protected]>2024-06-12 03:40:41 +0000
committer刘学利 <[email protected]>2024-06-12 03:40:41 +0000
commitb7d504620edb2a24b899fe85caa84c28a3ad8564 (patch)
treec75cd2978ba7ddf49f02f9e36e4b1a427ceb4946 /cmake/preInstall.sh
parent478696610e58d1f38b3491c4f3f8a9f9518383b3 (diff)
DNS Decoder create version
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
+