Skip to content

Commit

Permalink
Refs #4754. Add protection for empty variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Feb 7, 2012
1 parent 6835092 commit 7f5246a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Code/Mantid/Build/CMake/LinuxSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/rpm_remove_links.sh "#!/bin/sh\n"
)

file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/rpm_remove_empty_install.sh "#!/bin/sh\n"
"find $RPM_INSTALL_PREFIX0 -mindepth 1 -type d -empty -delete\n"
"rmdir --ignore-fail-on-non-empty -p $RPM_INSTALL_PREFIX0\n"
"if [ ! -z \"${RPM_INSTALL_PREFIX0}\" ]; then\n"
" find $RPM_INSTALL_PREFIX0 -mindepth 1 -type d -empty -delete\n"
" rmdir --ignore-fail-on-non-empty -p $RPM_INSTALL_PREFIX0\n"
"fi\n"
)

# Note: On older versions of CMake, this line may mean that to do a "make package" without being root
Expand Down

0 comments on commit 7f5246a

Please sign in to comment.