#!/bin/sh
# scripts/ogle.  Generated from ogle.in by configure.

create_pipe() { 
    if [ ! -p $1 ]; then
	rm -f $1;
        # So any other user can start the program / rm the pipes
        mkfifo $1; chmod 666 $1;
    fi
    # chgrp dvd $1;
}

create_pipe "/tmp/ac3"
create_pipe "/tmp/audio"

# information on the build 
echo "Build: Linux 2.2.20 #1 SMP Sun Mar 17 12:26:54 UTC 2002 i686 Pentium_III_(Coppermine) Sun Aug 11 18:06:44 UTC 2002 mmx Xv oss"
# and the os version we are running on
runtime="Runtime: `uname -m -r -s -v`"
runtime="${runtime} `uname -p 2> /dev/null`"
echo "$runtime"

# This is were all the helper programs are placed
prefix=/usr/X11R6
exec_prefix=/usr/X11R6
DVDP_ROOT=/usr/X11R6/lib/ogle

export DVDP_ROOT
DVDP_CTRL=$DVDP_ROOT/ogle_ctrl
export DVDP_CTRL
DVDP_DEMUX=$DVDP_ROOT/ogle_mpeg_ps
export DVDP_DEMUX
DVDP_CLI_UI=$DVDP_ROOT/ogle_cli
export DVDP_CLI_UI
if [ -z "$DVDP_UI" -o ! -x "$DVDP_UI" ]; then
if [ -x $DVDP_ROOT/ogle_gui ]; then
DVDP_UI=$DVDP_ROOT/ogle_gui
else
DVDP_UI=$exec_prefix/bin/ogle_gui
fi
fi
export DVDP_UI
#DVDP_AC3=$DVDP_ROOT/ogle_ac3_p
#DVDP_AC3=$DVDP_ROOT/ogle_a52
DVDP_AC3=$DVDP_ROOT/ogle_audio
export DVDP_AC3
DVDP_LPCM=$DVDP_ROOT/ogle_audio
export DVDP_LPCM
DVDP_MPEGAUDIO=$DVDP_ROOT/ogle_audio
export DVDP_MPEGAUDIO
DVDP_VIDEO=$DVDP_ROOT/ogle_mpeg_vs
export DVDP_VIDEO
DVDP_VMG=$DVDP_ROOT/ogle_nav
#DVDP_VMG=RUNNING
export DVDP_VMG
#DVDP_SPU=$DVDP_ROOT/subpicture/spu_wrap
DVDP_SPU=$DVDP_ROOT/ogle_vout
export DVDP_SPU
DVDP_VIDEO_OUT=$DVDP_ROOT/ogle_vout
export DVDP_VIDEO_OUT
if [ -x "$DVDP_UI" ]; then
  $DVDP_CTRL -u gui $*;
else
  $DVDP_CTRL -u cli $*;
fi;
