aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-29 23:17:46 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-29 23:17:46 +0000
commit84773cf8189fa997751fc967a738126af18683e9 (patch)
treee759d7537ea2a273973fa4e8da2c0901041700cc /scripts
parent61aae2a62285d93ed5326cfa0d85345e728ba34c (diff)
made it launch pd for each help file, then quit Pd
svn path=/trunk/; revision=11202
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/load_every_help.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/load_every_help.sh b/scripts/load_every_help.sh
index 43260050..ac20d671 100755
--- a/scripts/load_every_help.sh
+++ b/scripts/load_every_help.sh
@@ -14,6 +14,9 @@ make_netreceive_patch ()
touch $1
echo '#N canvas 222 130 454 304 10;' >> $1
echo "#X obj 111 83 netreceive $PORT_NUMBER 0 old;" >> $1
+ echo "#X obj 111 103 loadbang;" >> $1
+ echo "#X obj 111 123 print ----;" >> $1
+ echo "#X connect 1 0 2 0;" >> $1
}
open_patch ()
@@ -30,22 +33,31 @@ close_patch ()
echo "________________________________________________________________________________" >> $LOG_FILE
}
+launch_pd ()
+{
+ ${bindir}/pd -nogui -stderr -open $NETRECEIVE_PATCH >> $LOG_FILE 2>&1 &
+}
+quit_pd ()
+{
+ echo "; pd quit;" | ${bindir}/pdsend $PORT_NUMBER localhost tcp
+}
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 $helpdir -name '*.pd'`; do
filename=`echo $file|sed 's|.*/\(.*\.pd\)$|\1|'`
dir=`echo $file|sed 's|\(.*\)/.*\.pd$|\1|'`
+ sleep 1
+ launch_pd
+ sleep 10
open_patch $filename $dir
sleep 1
close_patch $filename
+ sleep 1
+ quit_pd
done
echo "COMPLETED!" >> $LOG_FILE