Register
It is currently Tue Oct 21, 2014 4:19 am

Vorbis Ogg installer


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Fri Jul 29, 2005 11:50 pm   
Site Admin

Joined: Tue May 17, 2005 7:31 pm
Posts: 251
Location: Georgia
Originally posted here on usalug.org

This script is a part of my larger bmms program. Since bmms uses vorbiscomment, oggenc, and oggdec, I wanted to provide an easy way for my users to get it. So I created this script:

Code:
#!/bin/bash
# Name: installVorbis.sh
# Author: Joshua Bailey (jbsnake (at nospam) usalug.org)

function errorInstall
{
   ./configure --prefix=/usr &&
   cd lib &&
   cp Makefile Makefile.bak &&
   sed s/-mno-ieee-fp// Makefile.bak > Makefile &&
   cd .. &&
   make &&
   make install
}

function install
{
   ./configure --prefix=/usr &&
   make &&
   make install
}

function getVorbisTools
{
   wget http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz
   wget http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz
   wget http://www.vorbis.com/files/1.0.1/unix/vorbis-tools-1.0.1.tar.gz
}

function installLibOgg
{
   tar zxvf libogg-1.1.tar.gz
   cd libogg-1.1
   install
   cd ~-
}

function installLibVorbis
{
   tar zxvf libvorbis-1.0.1.tar.gz
   cd libvorbis-1.0.1
   install
   if [[ $? > 0 ]]
   then
      errorInstall
   fi
   cd ~-
}

function installVorbisTools
{
   tar zxvf vorbis-tools-1.0.1.tar.gz
   cd vorbis-tools-1.0.1
   install
   cd ~-
}

id | grep "uid=0" > /dev/null

if [[ $? != 0 ]]
then
   echo "You must be root to run ${0}!"
   exit
fi

which gcc 2> /dev/null | grep "gcc" > /dev/null

if [[ $? > 0 ]]
then
        echo "You must have gcc in order to use this function!"
        echo "Either install gcc or download the binaries for vorbis"
        echo "on your own."
        exit
fi
   

ping -c2 http://www.vorbis.com > /dev/null

if [[ $? != 0 ]]
then
   echo "You must be connected to the internet!"
   exit
fi

echo "We are now going to download and install vorbis."
echo "Once it is downloaded, it will automatically install."
echo "You might want to go grab a bite to eat or take your"
echo "restroom break now."
read -p "Press enter to begin..."

getVorbisTools
installLibOgg
installLibVorbis
installVorbisTools


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP