[Cmake-commits] [cmake-commits] king committed CPack.RuntimeScript.in 1.5 1.6

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Oct 5 13:14:32 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv14081/Modules

Modified Files:
	CPack.RuntimeScript.in 
Log Message:
CPack: Fix bash-isms in launch script

Patch from Raphael Geissert and Modestas Vainius.  See issue #9659.


Index: CPack.RuntimeScript.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CPack.RuntimeScript.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** CPack.RuntimeScript.in	21 Jan 2009 16:54:29 -0000	1.5
--- CPack.RuntimeScript.in	5 Oct 2009 17:14:30 -0000	1.6
***************
*** 4,11 ****
  
  CWD="`dirname \"$0\"`"
! TMP=/tmp/$UID/TemporaryItems
  
  version=`sw_vers -productVersion`
! if [ "$?" == "0" ]; then
    major=${version%%\.*}
    rest=${version#*\.}
--- 4,11 ----
  
  CWD="`dirname \"$0\"`"
! TMP=/tmp/$(id -ru)/TemporaryItems
  
  version=`sw_vers -productVersion`
! if [ "$?" = "0" ]; then
    major=${version%%\.*}
    rest=${version#*\.}
***************
*** 25,29 ****
  
  # if 10.5 or greater, then all the open-x11 stuff need not occur
! if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
  version=`sw_vers -productVersion`
  if [ "$?" = "0" ]; then
--- 25,29 ----
  
  # if 10.5 or greater, then all the open-x11 stuff need not occur
! if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
  version=`sw_vers -productVersion`
  if [ "$?" = "0" ]; then
***************
*** 45,49 ****
  
  # if 10.5 or greater, then all the open-x11 stuff need not occur
! if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
  ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
  if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
--- 45,49 ----
  
  # if 10.5 or greater, then all the open-x11 stuff need not occur
! if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
  ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
  if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then



More information about the Cmake-commits mailing list