dart script works without chdir
authorrealraum <realraum@realraum.at>
Wed, 20 Jul 2011 00:12:21 +0000 (00:12 +0000)
committerrealraum <realraum@realraum.at>
Wed, 20 Jul 2011 00:12:21 +0000 (00:12 +0000)
dart/start-dart.sh

index 5ba5008..3d5471f 100755 (executable)
@@ -5,6 +5,8 @@ if [ -z "$1" ]; then
   exit 1
 fi
 
+MYSELF=`readlink -f "$0"`
+MYPATH=`dirname "$MYSELF"`
 mode=$1
 shift
 
@@ -22,7 +24,7 @@ signal_handler()
 stty -echo
 ssh dart killall ttyread 2>&1
 ssh dart ttyread /dev/ttyDart  >$FIFO &
-./eet $FIFO | ./dart-$mode.pl $* | ../dart-sounds/src/dart-sounds ../dart-sounds/media > /dev/null
+$MYPATH/eet $FIFO | perl -I $MYPATH $MYPATH/dart-$mode.pl $* | $MYPATH/../dart-sounds/src/dart-sounds $MYPATH/../dart-sounds/media > /dev/null
 rm -rf $FIFO_D
 
 exit 0