summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2024-05-21 09:33:33 +0800
committerliuxueli <[email protected]>2024-05-21 10:35:18 +0800
commited06f47a09cde9a13704745ffd0b5cee4b9d6d65 (patch)
treea2c0b4c059d353c9b6006003999e25d7ecf4b67a
parent513d4f178ff3aeb28684a4c2d584e34145e8ab7a (diff)
Bugfix: Update PreInstall.sh, defer_load.inf installs twicev1.0.22develop
-rw-r--r--cmake/PreInstall.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmake/PreInstall.in b/cmake/PreInstall.in
index ea89e39..f96f9f0 100644
--- a/cmake/PreInstall.in
+++ b/cmake/PreInstall.in
@@ -5,18 +5,18 @@ mkdir -p ${DST}/stellar_plugin/
touch ${DST}/stellar_plugin/spec.toml
touch ${DST}/plug/conflist.inf
-if ! grep -q '^\./plug/stellar_on_sapp/start_loader.inf$' "${DST}/plug/conflist.inf"; then
- if grep -q '^\[platform\]$' "${DST}/plug/conflist.inf"; then
- sed -i '/^\[platform\]$/a\./plug/stellar_on_sapp/start_loader.inf' "${DST}/plug/conflist.inf"
+if [[ -z `grep -rn 'start_loader.inf' ${DST}/plug/conflist.inf` ]];then
+ if [[ `grep -rn '^\[platform\]$' "${DST}/plug/conflist.inf"` ]]; then
+ sed -i '/\[platform\]/a\./plug/stellar_on_sapp/start_loader.inf' "${DST}/plug/conflist.inf"
else
echo -e "[platform]\n./plug/stellar_on_sapp/start_loader.inf" >> "${DST}/plug/conflist.inf"
fi
fi
-if ! grep -q '^\./plug/stellar_on_sapp/defer_loader.inf$' "${DST}/plug/conflist.inf"; then
- if grep -q '^\[business\]$' "${DST}/plug/conflist.inf"; then
- sed -i '/^\[business\]$/a\./plug/stellar_on_sapp/defer_loader.inf' "${DST}/plug/conflist.inf"
+if [[ -z `grep -rn 'defer_loader.inf' ${DST}/plug/conflist.inf` ]];then
+ if [[ `grep ^'\[business\]$' "${DST}/plug/conflist.inf"` ]]; then
+ sed -i '/\[business\]/a\./plug/stellar_on_sapp/defer_loader.inf' "${DST}/plug/conflist.inf"
else
echo -e "[business]\n./plug/stellar_on_sapp/defer_loader.inf" >> "${DST}/plug/conflist.inf"
fi
-fi \ No newline at end of file
+fi