# Setup script for multimedia configuration files.
-# Copyright (C) 2011-2012 Simon Ruderich
+# Copyright (C) 2011-2013 Simon Ruderich
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -e
+
. ../lib.sh
-# Link setup.
-link mplayer ~/.mplayer
+
+# MPlayer and MPlayer2 use the same configuration directory.
+if installed mplayer; then
+ if mplayer --help | grep MPlayer2 >/dev/null; then
+ link mplayer2 ~/.mplayer
+ else
+ link mplayer ~/.mplayer
+ fi
+fi