view migrate_config.sh @ 2335:e80c9dfc93aa trunk

[svn] - g_strsplit() wraps strsplit(3), and thus has different results on different systems (strsplit nul-terminates on uclibc). process URIs in a different way, as a result.
author nenolod
date Mon, 15 Jan 2007 08:44:39 -0800
parents d88558b0de0a
children aa15ae72f7fb
line wrap: on
line source

#!/bin/sh
#
# This script is used to convert the old $HOME/.audacious config dir
# to the new XDG basedir equivalent.
#

BMP_RCPATH=${BMP_RCPATH:-".audacious"}
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
XDG_DATA_HOME=${XDG_DATA_HOME:-"$HOME/.local/share"}
XDG_CACHE_HOME=${XDG_CACHE_HOME:-"$HOME/.cache"}

rm -fr "$XDG_CONFIG_HOME/audacious"
rm -fr "$XDG_DATA_HOME/audacious"
rm -fr "$XDG_CACHE_HOME/audacious"

mkdir -p "$XDG_CONFIG_HOME/audacious"
mkdir -p "$XDG_CONFIG_HOME/audacious/Plugins"
mkdir -p "$XDG_DATA_HOME/audacious/Skins"
mkdir -p "$XDG_CACHE_HOME/audacious/thumbs"

mv "$HOME/$BMP_RCPATH/config" "$XDG_CONFIG_HOME/audacious/"
mv "$HOME/$BMP_RCPATH/playlist.xspf" "$XDG_CONFIG_HOME/audacious/"
mv "$HOME/$BMP_RCPATH/Plugins" "$XDG_CONFIG_HOME/"
mv "$HOME/$BMP_RCPATH/Skins" "$XDG_DATA_HOME/"
mv "$HOME/$BMP_RCPATH/accels" "$XDG_CONFIG_HOME/"
mv "$HOME/$BMP_RCPATH/log" "$XDG_CONFIG_HOME/"

echo "Conversion done. Please move the remaining files manually."