Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv22057
Modified Files:
freevo
Log Message:
Make the script more powerfull. You can now access the helpers directly,
like "freevo imdb -s 'foo bar'" to search imdb for 'foo bar'. You can also
create a symlink imdb to freevo to make it all easier.
Index: freevo
===================================================================
RCS file: /cvsroot/freevo/freevo/freevo,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** freevo 3 Aug 2003 19:09:20 -0000 1.59
--- freevo 4 Aug 2003 18:41:11 -0000 1.60
***************
*** 6,14 ****
#
# Keep track of where we started. This env var is used inside Freevo.
export FREEVO_STARTDIR=$PWD
# Set this globaly, everything here should have access to these modules.
! export PYTHONPATH=./src:./src/www:./src/tv
if [ -w /var/run ] ; then
--- 6,68 ----
#
+
+
+ # begin configuration
+
+ helpers=helpers
+ src=src
+
+ # end configuration
+
+
+
+
+ # get information about freevo dir and the name we called with
+ if stat $0 | head -n 1 | grep "' -> \`" > /dev/null ; then
+ script=`stat $0 | head -n 1 | sed "s/.*' -> .\\(.*\\)./\\1/"`
+ else
+ script=`echo $0`
+ fi
+
+ call=`basename $0`
+ export FREEVO_HOME=`dirname $script`
+
+
# Keep track of where we started. This env var is used inside Freevo.
export FREEVO_STARTDIR=$PWD
# Set this globaly, everything here should have access to these modules.
! export
PYTHONPATH=$FREEVO_HOME:$FREEVO_HOME/$src:$FREEVO_HOME/$src/www:$FREEVO_HOME/$src/tv
!
! # Is runapp present? If not it needs to be compiled
! if ! [ -e "$FREEVO_HOME/runapp" ]; then
! echo
! echo "*************************************************************"
! echo "* Please note that there is a standalone binary release *"
! echo "* of Freevo with all dependencies included. Use that unless *"
! echo "* you are really capable of installing Freevo from source *"
! echo "* without assistance from the mailing lists or irc! *"
! echo "*************************************************************"
! echo
! echo "Freevo not compiled (runapp executable not found)"
! echo
! exit 1
! fi
!
! # call helper if the script is called as wrapper
! if [ "$call" == "freevo" ]; then
! script="$FREEVO_HOME/$helpers/$1.py"
! if [ -e "$script" ]; then
! shift
! fi
! else
! script="$FREEVO_HOME/$helpers/$call.py"
! fi
!
! if [ -e "$script" ]; then
! "$FREEVO_HOME/runapp" python "$script" "$@"
! exit 0
! fi
!
if [ -w /var/run ] ; then
***************
*** 20,24 ****
# cd to the freevo directory if necessary
if ! [ -e src/identifymedia.py ]; then
! cd `dirname $0`
fi
--- 74,79 ----
# cd to the freevo directory if necessary
if ! [ -e src/identifymedia.py ]; then
! cd $FREEVO_HOME
! unset FREEVO_HOME
fi
***************
*** 38,59 ****
fi
- # Is runapp present? If not it needs to be compiled
- if ! [ -e runapp ]; then
- echo
- echo "*************************************************************"
- echo "* Please note that there is a standalone binary release *"
- echo "* of Freevo with all dependencies included. Use that unless *"
- echo "* you are really capable of installing Freevo from source *"
- echo "* without assistance from the mailing lists or irc! *"
- echo "*************************************************************"
- echo
- echo "Freevo not compiled (runapp executable not found)"
- echo
- exit 1
- fi
# Help
if [ "$1" = "--help" ] || [ "$1" = "-" ] ; then
! echo "freevo [ options]"
echo "options:"
echo " setup run freevo setup to scan your environment"
--- 93,100 ----
fi
# Help
if [ "$1" = "--help" ] || [ "$1" = "-" ] ; then
! echo "freevo [ script | options]"
echo "options:"
echo " setup run freevo setup to scan your environment"
***************
*** 61,66 ****
--- 102,123 ----
echo " stop stop the current freevo process"
echo
+ echo "freevo can start the following scripts, use --help on these"
+ echo "scripts to get more informations about options"
+ echo
+
+ for i in $helpers/*.py; do
+ s=`echo $i | sed "s/^$helpers.\\(.*\\).py/\\1/"`
+ if [ "$s" != "__init__" ]; then
+ echo $s
+ fi
+ done
+ echo
+ echo "You can also create a symbolic link to free with the name of the"
+ echo "script you want to execute. E.g. put a link imdb pointing to freevo"
+ echo "in your patch to access the imdb helper script"
+ echo
echo "Before running freevo the first time, you need to run 'freevo setup'"
echo "After that, you can run freevo without parameter."
+ echo
exit 0
fi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog