Mercurial > mplayer.hg
annotate TOOLS/binary_codecs.sh @ 28203:e6e0560eb50d
Synced with r28122
author | jheryan |
---|---|
date | Sat, 03 Jan 2009 02:15:07 +0000 |
parents | e0aa87d3f88f |
children | dd89d439c911 |
rev | line source |
---|---|
27351
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
1 #!/bin/sh |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
2 set -e |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
3 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
4 # This script will download binary codecs for MPlayer unto a Debian system. |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
5 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
6 # Author: thuglife, mennucc1 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
7 # |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
8 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
9 CODECDIR=/usr/lib/codecs |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
10 PREFDIR=/var/lib/mplayer/prefs |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
11 MYSITE='http://people.debian.org/~mennucc1/mplayer' |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
12 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
13 dpkgarch=$(dpkg --print-installation-architecture) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
14 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
15 [ -d $PREFDIR ] || mkdir -v $PREFDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
16 [ -d $CODECDIR ] || mkdir -v $CODECDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
17 cd $CODECDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
18 [ -d mplayer_binary_codecs ] || mkdir -v mplayer_binary_codecs |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
19 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
20 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
21 choosemirror () |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
22 { |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
23 cd $PREFDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
24 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
25 #if [ ! -r mirrors ] || find mirrors -mtime +20 ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
26 echo Downloading mirrors list.. |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
27 wget -nv -c -N $MYSITE/mirrors || true |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
28 #fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
29 if [ ! -r bestsites ] || [ mirrors -nt bestsites ] || \ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
30 find bestsites -mtime +20 > /dev/null ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
31 if which netselect > /dev/null ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
32 echo Choosing best mirrors using netselect.... |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
33 netselect -s 5 $( cat mirrors ) | awk '{print $2}' > bestsites |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
34 elif which fping > /dev/null ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
35 fping -C 1 $( sed 's#.*//##;s#/.*##' mirrors ) 2>&1 | \ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
36 egrep -v 'bytes.*loss' | sort -n -k3 | \ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
37 grep -v ': *-' | awk '/:/{print $1}' | head -5 > bestsites |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
38 else |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
39 echo "(If you install 'netselect', it will select the best mirror for you" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
40 echo " you may wish to stop this script and rerun after installation)" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
41 sleep 5 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
42 head -3 mirrors > bestsites |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
43 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
44 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
45 } |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
46 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
47 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
48 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
49 INSTALL () { |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
50 filename="$3" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
51 dir="$2" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
52 url="$1" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
53 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
54 cd $CODECDIR/mplayer_binary_codecs |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
55 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
56 if [ -r $filename ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
57 cp $filename $filename.bak |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
58 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
59 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
60 if [ "$url" = @MAINSITE@ ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
61 cat $PREFDIR/bestsites | while read mainsite ; do |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
62 echo Downloading $filename from $mainsite ... |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
63 wget -v -c -N $mainsite/$dir/$filename || true |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
64 if [ -r "$filename" ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
65 UNPACK "$filename" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
66 [ -r $filename.bak ] && rm $filename.bak |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
67 return 0 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
68 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
69 done |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
70 else |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
71 wget -v -c -N $url/$dir/$filename || true |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
72 if [ -r "$filename" ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
73 UNPACK "$filename" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
74 [ -r $filename.bak ] && rm $filename.bak |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
75 return 0 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
76 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
77 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
78 } |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
79 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
80 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
81 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
82 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
83 UNPACK () |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
84 { |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
85 filename="$1" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
86 if [ ! -r $filename.bak ] || ! cmp $filename.bak $filename ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
87 echo Installing $filename ... |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
88 if [ -r $filename.list ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
89 tr '\n' '\000' < $filename.list | xargs -r0 rm || true |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
90 UNLINK $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
91 rm $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
92 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
93 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
94 case "$filename" in |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
95 *.tar.gz) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
96 tar xvzf $filename > $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
97 #rm $filename |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
98 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
99 *.tgz) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
100 tar xvzf $filename > $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
101 #rm $filename |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
102 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
103 *.tar.bz2) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
104 tar --bzip2 -xvf $filename > $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
105 #rm $filename |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
106 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
107 esac |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
108 LINK $filename.list |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
109 echo "Installed $filename Succesfully!" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
110 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
111 } |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
112 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
113 LINK () { |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
114 cd $CODECDIR/ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
115 cat $CODECDIR/mplayer_binary_codecs/$1 | while read f ; do |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
116 ln -sbf mplayer_binary_codecs/"$f" . |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
117 done |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
118 } |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
119 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
120 UNLINK () { |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
121 ### FIXME |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
122 # cd $CODECDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
123 # cat $CODECDIR/mplayer_binary_codecs/$1 | while f do |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
124 # ln -sbf mplayer_binary_codecs/"$f" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
125 # done |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
126 if which symlinks > /dev/null ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
127 symlinks -d $CODECDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
128 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
129 } |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
130 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
131 if [ `whoami` != root ]; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
132 echo "You must be 'root' to use this script. Login as root first!" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
133 exit 1 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
134 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
135 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
136 case "$1" in |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
137 install) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
138 choosemirror |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
139 cd $PREFDIR |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
140 #if [ ! -r codecs_list ] || find codecs_list -mtime +20 ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
141 echo 'Getting codecs list ...' |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
142 wget -nv -c -N $MYSITE/codecs_list || true |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
143 #fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
144 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
145 if grep -q "^$dpkgarch" $PREFDIR/codecs_list ] ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
146 egrep -v "^[[:space:]]*(#|$)" $PREFDIR/codecs_list | \ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
147 while read arch url dir file info ; do |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
148 if [ "$dpkgarch" = "$arch" ]; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
149 echo Installing $file $info... |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
150 INSTALL "$url" "$dir" "$file" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
151 n=1 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
152 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
153 done |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
154 else |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
155 echo "Sorry, no codecs for your arch '$dpkgarch'. Sorry dude :(" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
156 exit 1 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
157 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
158 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
159 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
160 uninstall) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
161 cd $CODECDIR/ |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
162 rm -rf mplayer_binary_codecs |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
163 #FIXME we need a better clean system |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
164 if which symlinks > /dev/null ; then |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
165 symlinks -d . |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
166 else |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
167 echo "please install the package 'symlinks' and run 'symlinks -d $CODECDIR' " |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
168 fi |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
169 echo "Uninstalled Succesfully!" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
170 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
171 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
172 *) |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
173 echo "Usage: {install|uninstall}" |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
174 echo "This program will install binary codecs for MPlayer." |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
175 exit 1 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
176 ;; |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
177 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
178 esac |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
179 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
180 |
4f0fa46528ff
Revert previous broken rename of binary-codecs.sh that had random changes.
diego
parents:
diff
changeset
|
181 exit 0 |