[PD-cvs] scripts load_every_object.sh,1.1,1.2
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Wed Apr 26 16:13:53 CEST 2006
Update of /cvsroot/pure-data/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22144
Modified Files:
load_every_object.sh
Log Message:
added some improvements ;-) that allow me adapt the script to my setup
without (hopefully) breaking anything;
Index: load_every_object.sh
===================================================================
RCS file: /cvsroot/pure-data/scripts/load_every_object.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** load_every_object.sh 8 Feb 2006 04:59:10 -0000 1.1
--- load_every_object.sh 26 Apr 2006 14:13:51 -0000 1.2
***************
*** 11,18 ****
--- 11,43 ----
TEST_PATCH=.____test_patch.pd
+ PRE_SLEEP=30
+
helpdir=${PD_ROOT}/doc
objectsdir=${PD_ROOT}/extra
bindir=${PD_ROOT}/bin
+ #PDSEND=${bindir}/pdsend
+ #PD=${bindir}/pd
+
+ # if ${PD} is not set, it will be set to ${bindir}/pd
+ # if ${PD} is already set, this value will be used
+ ## this way we can use a 'default' pd to test externals
+ ## that live not necessarily in ${PD_ROOT}/bin/../extra
+ if test "x${PD}" = "x" ; then
+ PD=${bindir}/pd
+ fi
+ if test "x${PDSEND}" = "x" ; then
+ PDSEND=${PDSEND:-${bindir}/pdsend}
+ fi
+
+ # just imagine there is no [...]/extra directory
+ # because i want to test a bunch of "not installed"
+ # objects...
+ if test -d "${objectsdir}" ; then
+ :
+ else
+ objectsdir=${PD_ROOT}
+ fi
+
function make_netreceive_patch ()
***************
*** 36,40 ****
{
echo "OPENING: $1 $2" >> $LOG_FILE
! echo "; pd open $1 $2;" | ${bindir}/pdsend $PORT_NUMBER localhost tcp
}
--- 61,65 ----
{
echo "OPENING: $1 $2" >> $LOG_FILE
! echo "; pd open $1 $2;" | ${PDSEND} $PORT_NUMBER localhost tcp
}
***************
*** 42,52 ****
{
echo "CLOSING: $1" >> $LOG_FILE
! echo "; pd-$1 menuclose;" | ${bindir}/pdsend $PORT_NUMBER localhost tcp
}
UNAME=`uname -s`
! if [ $UNAME == "Darwin" ]; then
EXTENSION=pd_darwin
! elif [ $UNAME == "Linux" ]; then
EXTENSION=pd_linux
else
--- 67,77 ----
{
echo "CLOSING: $1" >> $LOG_FILE
! echo "; pd-$1 menuclose;" | ${PDSEND} $PORT_NUMBER localhost tcp
}
UNAME=`uname -s`
! if test "x$UNAME" == "xDarwin" ; then
EXTENSION=pd_darwin
! elif test "x$UNAME" == "xLinux" ; then
EXTENSION=pd_linux
else
***************
*** 54,69 ****
fi
! echo "Searching for $EXTENSION"
make_netreceive_patch $NETRECEIVE_PATCH
touch $LOG_FILE
! ${bindir}/pd -nogui -stderr -open $NETRECEIVE_PATCH >> $LOG_FILE 2>&1 &
#wait for pd to start
! sleep 30
! for file in `find $objectsdir -name "*.${EXTENSION}"`; do
echo $file
filename=`echo $file|sed 's|.*/\(.*\.[adilnpruwx_]*\)$|\1|'`
dir=`echo $file|sed 's|\(.*\)/.*\.[adilnpruwx_]*$|\1|'`
--- 79,100 ----
fi
! echo "Searching for ${EXTENSION} in ${objectsdir}"
make_netreceive_patch $NETRECEIVE_PATCH
touch $LOG_FILE
! ${PD} -nogui -stderr -open $NETRECEIVE_PATCH -path ${objectsdir} >> $LOG_FILE 2>&1 &
#wait for pd to start
! echo -n going to sleep for ${PRE_SLEEP} secs...
! sleep ${PRE_SLEEP}
! echo "ready to perform!"
! #for file in `find $objectsdir -name "*.${EXTENSION}"`; do
! find ${objectsdir} -name "*.${EXTENSION}" | while read file; do
echo $file
+ #JMZ: wow, couldn't this be done with following?
+ # filename=${file##*/}
+ # dir=${file%/*}
filename=`echo $file|sed 's|.*/\(.*\.[adilnpruwx_]*\)$|\1|'`
dir=`echo $file|sed 's|\(.*\)/.*\.[adilnpruwx_]*$|\1|'`
***************
*** 76,78 ****
echo "COMPLETED!" >> $LOG_FILE
! echo "; pd quit;" | ${bindir}/pdsend $PORT_NUMBER localhost tcp
--- 107,109 ----
echo "COMPLETED!" >> $LOG_FILE
! echo "; pd quit;" | ${PDSEND} $PORT_NUMBER localhost tcp
More information about the Pd-cvs
mailing list