When one attempts to install the (slightly older) 'MPlayer-svn-gtk1.tcz' extension the following error messages are to be observed:
mkdir: can't create directory '/home/root/.mplayer': No such file or directory
ln: /home/root/.mplayer/subfont.ttf: No such file or directory
sh: missing ]
cp: can't create '/home/root/.mplayer/': Path does not exist
I believe those problems would go away if the 'USER' variable would be correctly set and a closing bracket added to where it's needed. So the whole script would look more like:
#!/bin/sh
read USER < /etc/sysconfig/tcuser
[ -d /home/$USER/.mplayer ] \
|| mkdir -p /home/$USER/.mplayer \
&& chown $USER:staff /home/$USER/.mplayer
[ -e /home/$USER/.mplayer/subfont.ttf ] \
|| ln -s /usr/share/fonts/luxisr.ttf /home/$USER/.mplayer/subfont.ttf
[ -e /home/$USER/.mplayer/gui.conf ] \
|| cp -p /usr/local/share/mplayer/gui.conf /home/$USER/.mplayer \
&& chown $USER:staff /home/$USER/.mplayer/gui.conf
You'll note that I'm a HUGE fan of 80 characters per line, hence a few more (cosmetic) changes have crept in ...