Hi,

another script to install something, while knoppix is running!

One problem is, that it'll only work, if browser/realplayer is started from shell (konsole)...

But for the moment you can live with it, can't you?

Also you need to reopen, current shell or just do a:

Code:
. ~/.bashrc
And I'll try to fix it )

cu

Fabian

PS: Enjoy!

Code:
#!/bin/bash
# 
# Install realplayer + plugin from local directory
# 
# Note that browser plugin only works with programs started from commandline for now!
# 
# GPL 
# 
# Author: Fabian Franz <[email protected]> 
        


RP_NAME="rp8_linux20_libc6_i386_cs2_rpm"

if [ -f "$RP_NAME" ]; 
then
  mkdir -p /tmp/rp_inst
  cp $RP_NAME /tmp/rp_inst/
  cd /tmp/rp_inst
  # Unpack it
  rpm2cpio $RP_NAME | cpio --extract --make-directories
  
  # Install it
  mkdir -p $HOME/software
  cp -a usr/lib/RealPlayer8 $HOME/software/

  # Install mozilla plugin
  mkdir -p $HOME/.mozilla/plugins/ 
  ln -sf $HOME/software/RealPlayer8/rpnp.so $HOME/.mozilla/plugins/
  
  # Install netscape plugin
  mkdir -p $HOME/.netscape/plugins/
  ln -sf $HOME/software/RealPlayer8/rpnp.so $HOME/.netscape/plugins/

  # Scan for new plugins
  nspluginscan

  # Make start-script and symlinks
  mkdir -p $HOME/bin
  echo "#!/bin/sh" > $HOME/bin/realplayer
  echo "LD_LIBRARY_PATH=$HOME/software/RealPlayer8:$LD_LIBRARY_PATH exec $HOME/software/RealPlayer8/realplay \"\$@\"" >> $HOME/bin/realplayer
  chmod 755 $HOME/bin/realplayer
  
  ln -sf $HOME/bin/realplayer $HOME/bin/realplay
  ln -sf $HOME/bin/realplayer $HOME/bin/rvplayer

  # setuo $HOME/.bashrc

  mkdir -p $HOME/bin
  mkdir -p $HOME/lib
  mkdir -p $HOME/man
  
  cp $HOME/.bashrc $HOME/.bashrc.templ 
  cat $HOME/.bashrc.templ | grep -v "export MANPATH=\$HOME/man" | grep -v "export PATH=\$HOME/bin/" | grep -v "export LD_LIBRARY_PATH=\$HOME/lib" > $HOME/.bashrc 
  echo "export MANPATH=\$HOME/man/:\$MANPATH" >> $HOME/.bashrc 
  echo "export PATH=\$HOME/bin/:\$PATH" >> $HOME/.bashrc 
  echo "export LD_LIBRARY_PATH=\$HOME/lib:\$LD_LIBRARY_PATH" >> $HOME/.bashrc 
  rm -f $HOME/.bashrc.templ 
  
  # cleanup 
  cd $HOME
  rm -rf /tmp/rp_inst
else
  echo "$RP_NAME is needed in current dir to install Realplayer" 
  echo "Please download it from: http://scopes.real.com/real/player/unix/unix.html"
fi