diff options
| author | liuxueli <[email protected]> | 2020-06-29 10:17:51 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2020-06-29 10:17:51 +0800 |
| commit | dde53a5200a0f692875bbd03c815ec097a0052a2 (patch) | |
| tree | 6e1557601ca3c5ecf27fc5cc94654004b88f7a33 /cmake | |
| parent | 536aee91dfff81d7d41838551da119587f38a360 (diff) | |
调整preInstall和preUninstall的位置v3.0.0
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/PreInstall.sh | 19 | ||||
| -rw-r--r-- | cmake/PreUninstall.sh | 9 |
2 files changed, 28 insertions, 0 deletions
diff --git a/cmake/PreInstall.sh b/cmake/PreInstall.sh new file mode 100644 index 0000000..b944fc8 --- /dev/null +++ b/cmake/PreInstall.sh @@ -0,0 +1,19 @@ +DST=${RPM_INSTALL_PREFIX} + +mkdir -p ${DST}/plug/platform/ +mkdir -p ${DST}/etc/ +touch ${DST}/plug/conflist.inf +touch ${DST}/etc/project_list.conf + +if [[ -z `grep -rn 'POLICY_PRIORITY' ${DST}/etc/project_list.conf` ]];then + echo 'POLICY_PRIORITY struct' >> ${DST}/etc/project_list.conf +fi + +if [[ -z `grep -rn 'TSG_MASTER_INTERNAL_LABEL' ${DST}/etc/project_list.conf` ]];then + echo 'TSG_MASTER_INTERNAL_LABEL struct' >> ${DST}/etc/project_list.conf +fi + +if [[ -z `grep -rn 'tsg_master.inf' ${DST}/plug/conflist.inf` ]];then + sed -i '/\[platform\]/a\./plug/platform/tsg_master/tsg_master.inf' ${DST}/plug/conflist.inf +fi + diff --git a/cmake/PreUninstall.sh b/cmake/PreUninstall.sh new file mode 100644 index 0000000..96abc6f --- /dev/null +++ b/cmake/PreUninstall.sh @@ -0,0 +1,9 @@ +if [ $1 == 0 ]; then + DST=${RPM_INSTALL_PREFIX} + + mkdir -p ${DST}/plug/platform/ + sed -i '/tsg_master.inf/d' ${DST}/plug/conflist.inf + sed -i '/POLICY_PRIORITY/d' ${DST}/etc/project_list.conf + sed -i '/TSG_MASTER_INTERNAL_LABEL/d' ${DST}/etc/project_list.conf +fi + |
