diff --git a/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_install.sh.in b/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_install.sh.in index e5686bffd2fc7f0bdc14e661d992efede5965f35..a611e2c76bf9e6996af8a519cfa7ddd7772b9141 100644 --- a/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_install.sh.in +++ b/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_install.sh.in @@ -21,10 +21,13 @@ if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.csh /etc/profile.d/mantid.csh ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.pth @PYTHON_SITE@/mantid.pth else - # Create symbolic links in world's path - if [ ! -L /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ ]; then - ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ + # symbolic links in world's path of mantidplot + if [ -f $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot ]; then + if [ ! -L /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ ]; then + ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ + fi fi + # symbolic link for mantidpython if [ ! -L /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@ ]; then ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidpython /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@ fi diff --git a/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_uninstall.sh.in b/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_uninstall.sh.in index ade8f26f4414598b49c4b0dd487e74c4d909b426..a5e3eba4ac41ac7a73e150acc57cf79a501203c1 100644 --- a/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_uninstall.sh.in +++ b/buildconfig/CMake/Packaging/rpm/scripts/rpm_post_uninstall.sh.in @@ -10,7 +10,7 @@ ENVVARS_ON_INSTALL=@ENVVARS_ON_INSTALL_INT@ # Remove exe and links only if it looks like we were removed # and not upgraded. If launch_mantidplot.sh exists then package # has been upgraded and MantidPlot_exe replaced so don't touch anything -if [ ! -e $RPM_INSTALL_PREFIX0/@BIN_DIR@/launch_mantidplot.sh ]; then +if [ ! -e $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot ]; then rm $RPM_INSTALL_PREFIX0/@BIN_DIR@/MantidPlot_exe if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then