Register
It is currently Thu Oct 30, 2014 2:21 pm

Vorbis Ogg installer


All times are UTC


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sat Jul 30, 2005 5:46 am   
Moderator
User avatar

Joined: Tue Dec 02, 2003 7:48 pm
Posts: 1723
Location: Georgia
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

_________________
server: Arch Linux - Kernel 2.6.33-ARCH
Lenovo T60 StinkPad: Arch Linux - Kernel 3.10.10-1-ARCH
VirtualBox 4.2.18 Hosted on MacOS X (10.7.5) Mountain Lion: Arch Linux - Kernel 3.10.10-1-ARCH


Top
 Profile  
 PostPosted: Sat Jul 30, 2005 8:50 am   
Sr. Member
User avatar

Joined: Wed Aug 11, 2004 7:18 am
Posts: 1947
Location: Lewisburg, Tennessee
Very nice :)

BTW, I use oggies on my iRiver. My files are about 80% of the size of a mp3, and sound just as good (if not better).

_________________
OpenSuSE 10.3


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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


Powered by phpBB © 2012 phpBB Group
© 2003 - 2012 USA LINUX USERS GROUP