Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv12225

Modified Files:
        freevo 
Log Message:
search for correct python binary

Index: freevo
===================================================================
RCS file: /cvsroot/freevo/freevo/freevo,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** freevo      23 Sep 2003 13:31:23 -0000      1.85
--- freevo      5 Oct 2003 10:36:37 -0000       1.86
***************
*** 12,15 ****
--- 12,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.86  2003/10/05 10:36:37  dischi
+ # search for correct python binary
+ #
  # Revision 1.85  2003/09/23 13:31:23  outlyer
  # More FreeBSD patches from Lars
***************
*** 95,98 ****
--- 98,112 ----
  export RUNAPP=""
  
+ # search for the correct Python binary
+ PYTHON=python
+ for name in python python2 python2.3; do
+     for p in `echo $PATH | sed 's/:/ /g'`; do 
+       if [ -e "$p/$name" ]; then
+           PYTHON="$p/$name"
+           break
+       fi
+     done
+ done
+ 
  # Check the environment we started in. There are three choices:
  # o installed into the system
***************
*** 112,115 ****
--- 126,130 ----
        # we also have a runtime
        export RUNAPP="`dirname $FREEVO_SCRIPT`/runtime/runapp"
+       PYTHON=python
      fi
  
***************
*** 117,122 ****
      # we have an installed version
      # find the freevo libs
!     python -c 'import freevo' || exit 1
!     export FREEVO_PYTHON=`python -c 'import freevo; print freevo.__path__' | \
                     sed 's/..\(.*\)../\1/'`
      FREEVO_HELPERS=$FREEVO_PYTHON/helpers
--- 132,137 ----
      # we have an installed version
      # find the freevo libs
!     $PYTHON -c 'import freevo' || exit 1
!     export FREEVO_PYTHON=`$PYTHON -c 'import freevo; print freevo.__path__' | \
                     sed 's/..\(.*\)../\1/'`
      FREEVO_HELPERS=$FREEVO_PYTHON/helpers
***************
*** 187,191 ****
      PID_FILE="$PID_DIR/freevo-$name.pid"
      if [ "$1" = "start" ]; then
!       $RUNAPP python "$script" &
        echo $! > $PID_FILE
        disown
--- 202,206 ----
      PID_FILE="$PID_DIR/freevo-$name.pid"
      if [ "$1" = "start" ]; then
!       $RUNAPP $PYTHON "$script" &
        echo $! > $PID_FILE
        disown
***************
*** 198,202 ****
        fi
      else
!       $RUNAPP python "$script" "$@" &
        echo $! > $PID_FILE
        trap kill_waiting_child SIGTERM
--- 213,217 ----
        fi
      else
!       $RUNAPP $PYTHON "$script" "$@" &
        echo $! > $PID_FILE
        trap kill_waiting_child SIGTERM
***************
*** 248,252 ****
  if [ "$1" = "setup" ] ; then
      shift 1
!     $RUNAPP python $FREEVO_PYTHON/setup_freevo.py $@
      exit 0
  fi
--- 263,267 ----
  if [ "$1" = "setup" ] ; then
      shift 1
!     $RUNAPP $PYTHON $FREEVO_PYTHON/setup_freevo.py $@
      exit 0
  fi
***************
*** 277,281 ****
  # Support for using just Python
  if [ "$1" = "prompt" ] ; then
!     $RUNAPP python
      exit 0
  fi
--- 292,296 ----
  # Support for using just Python
  if [ "$1" = "prompt" ] ; then
!     $RUNAPP $PYTHON
      exit 0
  fi
***************
*** 299,303 ****
  
      trap './freevo stop $APP' 1 2 15
!     $RUNAPP python $@ &
      #echo PID is $!
      echo $! > $PID_FILE
--- 314,318 ----
  
      trap './freevo stop $APP' 1 2 15
!     $RUNAPP $PYTHON $@ &
      #echo PID is $!
      echo $! > $PID_FILE
***************
*** 354,358 ****
  
      # Start the main freevo application
!     $RUNAPP python $OPTIMZE $FREEVO_PYTHON/main.py $@ > /dev/null 2>&1 &
      
      echo $! > $PID_FILE
--- 369,373 ----
  
      # Start the main freevo application
!     $RUNAPP $PYTHON $OPTIMZE $FREEVO_PYTHON/main.py $@ > /dev/null 2>&1 &
      
      echo $! > $PID_FILE
***************
*** 362,366 ****
  
  # Start the main freevo application
! $RUNAPP python $OPTIMZE $FREEVO_PYTHON/main.py $@ &
  
  echo $! > $PID_FILE
--- 377,381 ----
  
  # Start the main freevo application
! $RUNAPP $PYTHON $OPTIMZE $FREEVO_PYTHON/main.py $@ &
  
  echo $! > $PID_FILE




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to