3 # Author: thuglife, mennucc1
8 arch
=$
(dpkg
--print-installation-architecture)
10 codecsdir
=/usr
/lib
/codecs
12 [ -d $codecsdir ] || mkdir
-v $codecsdir
14 [ -d mplayer_win32_codecs
] || mkdir
-v mplayer_win32_codecs
21 cd $codecsdir/mplayer_win32_codecs
23 if [ -r $filename.list
] ; then
24 #if we stop the script, we don't want to redownload things
25 #fixme we should check timestamps
26 echo You have already downloaded and installed
$filename.
31 tar xvzf
$filename > $filename.list
35 tar xvzf
$filename > $filename.list
39 tar --bzip2 -xvf $filename > $filename.list
44 ln -sbf mplayer_win32_codecs
/*/* .
45 echo "Installed Succesfully!"
50 if [ `whoami` != root
]; then
51 echo "You must be root to start this script. Login as root first!"
57 if [ "$arch" = "i386" ]; then
61 pref
=$codecsdir/mplayer_win32_codecs
/bestsite
64 if [ -r $pref ] ; then
67 if [ -f /usr
/bin
/netselect
] ; then
68 echo Choosing best mirror using netselect....
70 http
://www1.mplayerhq.hu
/MPlayer
/releases
/codecs
/ \
71 http
://www2.mplayerhq.hu
/MPlayer
/releases
/codecs
/ \
72 http
://ftp.lug.udel.edu
/MPlayer
/releases
/codecs
/ \
73 |
awk '{print $2}' > $pref
76 echo "(If you install 'netselect', it will select the best mirror for you."
77 echo " You may wish to stop this script and rerun after installation.)"
82 #sanity check, in case netselect fails
83 mainhost
=`echo $mainurl | sed 's|http://||;s|ftp://||;s|/.*||g'`
84 echo Test
if $mainhost exists and is ping-able...
85 if [ "$mainurl" = '' ] ||
! ping -c1 "$mainhost" > /dev
/null
; then
86 domain
=`hostname -f | sed 's/.*\.//g' `
87 mainurl
=http
://www1.mplayerhq.hu
/MPlayer
/releases
/codecs
/
88 if [ "$domain" = 'edu' -o "$domain" = 'com' ] ; then
89 mainurl
=http
://ftp.lug.udel.edu
/MPlayer
/releases
/codecs
/
91 if [ "$domain" = 'de' -o "$domain" = 'it' ] ; then
92 mainurl
=http
://www2.mplayerhq.hu
/MPlayer
/releases
/codecs
/
96 #INSTALL win32.tar.gz http://ers.linuxforum.hu/
98 INSTALL win32codecs-lite.
tar.bz2
$mainurl
99 #INSTALL w32codec.tar.bz2 http://www.mplayerhq.hu/MPlayer/releases/
100 INSTALL rp9codecs.
tar.bz2
$mainurl
101 INSTALL qt6dlls.
tar.bz2
$mainurl
102 elif [ "$arch" = "alpha" ]; then
103 INSTALL rp8codecs-alpha.
tar.bz2
$mainurl
104 elif [ "$arch" = "powerpc" ]; then
105 INSTALL rp8codecs-ppc.
tar.bz2
$mainurl
106 INSTALL xanimdlls-ppc.
tar.bz2
$mainurl
108 echo "Sorry, no codecs for your arch. Sorry dude :("
117 rm -rf mplayer_win32_codecs
118 #FIXME we need a better clean system
119 if [ -r /usr
/bin
/symlinks
] ; then
122 echo "Please install the package 'symlinks' and run 'symlinks -d $codecsdir'."
124 echo "Uninstalled Succesfully!"
129 echo "Usage: {install|uninstall}"