diff options
| author | songyanchao <[email protected]> | 2024-03-21 10:37:31 +0800 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2024-03-21 10:37:31 +0800 |
| commit | 2423bb663af4a75f0c44ba9016158f04b41219b6 (patch) | |
| tree | b68554b9703066f69ecb90c515b31ac99e158405 /cmake | |
| parent | 184cd89d41df6550127516e17500c1c4bf3da174 (diff) | |
🐞 fix: Refine condition checks in PostInstall.in and PostUninstall.in scripts.
Refine condition checks in PostInstall.in and PostUninstall.in scripts.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/PostInstall.in | 2 | ||||
| -rw-r--r-- | cmake/PostUninstall.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmake/PostInstall.in b/cmake/PostInstall.in index 009825f..eed699c 100644 --- a/cmake/PostInstall.in +++ b/cmake/PostInstall.in @@ -9,7 +9,7 @@ if [ ! -d "$mrzcpd_bin_path" ]; then mkdir -p "$mrzcpd_bin_path" fi -if [ $1 -gt 1 ]; then +if [ $1 -eq 1 ]; then command="update-alternatives --altdir @CMAKE_INSTALL_PREFIX@/altdir \ --install \ @MR_ALTERNATIVE_BINDIR@/mrzcpd \ diff --git a/cmake/PostUninstall.in b/cmake/PostUninstall.in index 8c94d9f..4f0e9f0 100644 --- a/cmake/PostUninstall.in +++ b/cmake/PostUninstall.in @@ -1,7 +1,7 @@ %systemd_postun_with_restart mrenv.service mrzcpd.service mrtunnat.service /sbin/ldconfig -if [ $ 1 -gt 0 ]; then +if [ $ 1 -eq 0 ]; then command="update-alternatives --remove mrzcpd @CMAKE_INSTALL_PREFIX@/@MR_INSTALL_BINDIR@/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir" eval $command fi |
