diff options
| author | lijia <[email protected]> | 2024-07-22 10:34:56 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2024-07-22 13:35:54 +0800 |
| commit | 2ee4770462185daec28e8bb424c8e188e194c996 (patch) | |
| tree | c4394242f00311d4d7d7c84011672364c851c691 /cmake/preInstall.sh | |
| parent | 6e906a14fee875eff1cac600710f2cedcaaef9b6 (diff) | |
Diffstat (limited to 'cmake/preInstall.sh')
| -rw-r--r-- | cmake/preInstall.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh new file mode 100644 index 0000000..0668303 --- /dev/null +++ b/cmake/preInstall.sh @@ -0,0 +1,14 @@ +#!/bin/sh +DST=${RPM_INSTALL_PREFIX}/sapp/ + +mkdir -p ${DST}/stellar_plugin +touch ${DST}/stellar_plugin/spec.toml + +if ! grep -q '^\./plug/stellar_plugin/ftp_decoder/ftp_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/ftp_decoder/ftp_decoder.so\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "init = \"FTP_ONLOAD\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "exit = \"FTP_UNLOAD\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" +fi |
