MPlayer - The Movie Player
Artigo que mostra como instalar o MPlayer a partir de sua versão CVS, com suporte a bibliotecas que o permite ser executado a partir do console (modo texto). De quebra ainda teremos acesso a um script que o instala automaticamente.
Parte 5: Script para automatizar tarefa
Esse script está com os dados do autor original, não vou remover, mas eu fiz algumas modificações para que ele voltasse a funcionar adequadamente. Segue o script.
#!/bin/bash
# Por: William da Rocha Lima wrochal@linuxit.com.br 23/01/2004
# www.linuxit.com.br
# Mplayer Install versão 1.01
# Script automatizar download do Mplayer
#
# 23/01/2004 - Adicionado no comando wget "-c (Download continuo) e --passive-ftp"
# 29/03/2004 - Adicionado Suporte a Português, XMMS, Kit DVD, GUI, Xanim e menu
#
############### Parâmetros ################
dir=/opt/
wget='which wget`
tar=`which tar`
cp=`which cp`
mv=`which mv`
######### CODECS #########
cd $dir;
if [ -f $dir/all-20040916.tar.bz2 ]; then
echo " all-20040916.tar.bz2 Codecs já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/releases/codecs/all-20040916.tar.bz2;
fi
if [ -f $dir/all-20040916.tar.bz2]; then
$tar -jxvf all-20040916.tar.bz2;
cd all-20040916;
mkdir /usr/lib/win32;
cp *.* /usr/lib/win32;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi
######### Skins Default #########
# retirei suporte a skins, porque isso não é importante para nós
#cd $dir;
#if [ -f $dir/default-1.7.tar.bz2 ]; then
# echo "default-1.7.tar.bz2 Skin já baixado";
#else
# $wget --passive-ftp #http://www.mplayerhq.hu/MPlayer/Skin/default-1.7.tar.bz2;
#fi
#if [ -f $dir/default-1.7.tar.bz2 ]; then
# mkdir -p /usr/local/share/mplayer/Skin;
# $tar jxvf default-1.7.tar.bz2 -C /usr/local/share/mplayer/Skin;
#else
# echo "Não foi possível completar, verifique o que acontece!!!!!";
# exit;
#fi
######### Fonte Arial 14 #########
cd $dir;
if [ -f $dir/font-arial-iso-8859-1.tar.bz2 ]; then
echo "font-arial-iso-8859-1.tar.bz2 Fontes já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2;
fi
if [ -f $dir/font-arial-iso-8859-1.tar.bz2 ]; then
mkdir -p /usr/local/share/mplayer/font;
$tar jxvf font-arial-iso-8859-1.tar.bz2 -C /usr/local/share/mplayer/font;
mv /usr/local/share/mplayer/font/font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi
######### Mplayer v1.0pre3 #########
cd $dir;
if [ -f $dir/MPlayer-current.tar.bz2 ]; then
echo "MPlayer-current.tar.bz2 já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/cvs/MPlayer-current.tar.bz2;
fi
if [ -f $dir/MPlayer-current.tar.bz2 ]; then
$tar jxvf MPlayer-current.tar.bz2;
cd MPlayer-current;
echo " Configure ";
sleep 10;
./configure --language=pt_BR;
echo " Make ";
sleep 10;
make;
echo " Make Install ";
sleep 10;
make install;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi
# Por: William da Rocha Lima wrochal@linuxit.com.br 23/01/2004
# www.linuxit.com.br
# Mplayer Install versão 1.01
# Script automatizar download do Mplayer
#
# 23/01/2004 - Adicionado no comando wget "-c (Download continuo) e --passive-ftp"
# 29/03/2004 - Adicionado Suporte a Português, XMMS, Kit DVD, GUI, Xanim e menu
#
############### Parâmetros ################
dir=/opt/
wget='which wget`
tar=`which tar`
cp=`which cp`
mv=`which mv`
######### CODECS #########
cd $dir;
if [ -f $dir/all-20040916.tar.bz2 ]; then
echo " all-20040916.tar.bz2 Codecs já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/releases/codecs/all-20040916.tar.bz2;
fi
if [ -f $dir/all-20040916.tar.bz2]; then
$tar -jxvf all-20040916.tar.bz2;
cd all-20040916;
mkdir /usr/lib/win32;
cp *.* /usr/lib/win32;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi
######### Skins Default #########
# retirei suporte a skins, porque isso não é importante para nós
#cd $dir;
#if [ -f $dir/default-1.7.tar.bz2 ]; then
# echo "default-1.7.tar.bz2 Skin já baixado";
#else
# $wget --passive-ftp #http://www.mplayerhq.hu/MPlayer/Skin/default-1.7.tar.bz2;
#fi
#if [ -f $dir/default-1.7.tar.bz2 ]; then
# mkdir -p /usr/local/share/mplayer/Skin;
# $tar jxvf default-1.7.tar.bz2 -C /usr/local/share/mplayer/Skin;
#else
# echo "Não foi possível completar, verifique o que acontece!!!!!";
# exit;
#fi
######### Fonte Arial 14 #########
cd $dir;
if [ -f $dir/font-arial-iso-8859-1.tar.bz2 ]; then
echo "font-arial-iso-8859-1.tar.bz2 Fontes já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2;
fi
if [ -f $dir/font-arial-iso-8859-1.tar.bz2 ]; then
mkdir -p /usr/local/share/mplayer/font;
$tar jxvf font-arial-iso-8859-1.tar.bz2 -C /usr/local/share/mplayer/font;
mv /usr/local/share/mplayer/font/font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi
######### Mplayer v1.0pre3 #########
cd $dir;
if [ -f $dir/MPlayer-current.tar.bz2 ]; then
echo "MPlayer-current.tar.bz2 já baixado";
else
$wget --passive-ftp http://www1.mplayerhq.hu/MPlayer/cvs/MPlayer-current.tar.bz2;
fi
if [ -f $dir/MPlayer-current.tar.bz2 ]; then
$tar jxvf MPlayer-current.tar.bz2;
cd MPlayer-current;
echo " Configure ";
sleep 10;
./configure --language=pt_BR;
echo " Make ";
sleep 10;
make;
echo " Make Install ";
sleep 10;
make install;
else
echo "Não foi possível completar, verifique o que acontece!!!!!";
exit;
fi