public
Last active

Adium theme installer for Empathy

  • Download Gist
adiumxtra-install
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#!/bin/sh
# Adium theme AdiumMessageStyle installer for Empathy
# Originally © 2009 Antono Vasiljev
# Licensed under the same terms as Empathy
# http://antono.info/en/165-install-adium-themes-to-empathy
# Changed by Vertlo Oraerk (did not work with directories containing spaces in the names)
 
if [ -z $1 ]
then
echo
echo "Usage:"
echo "`basename $0` adiumxtra://some.url.here/extra"
echo
exit 1
else
TMPDIR=`mktemp --directory`
XTRAURL=`echo $1 | sed -e "s/^adiumxtra:/http:/"`
DEST="$HOME/.local/share/adium/message-styles/"
if [ ! -d $DEST ]
then
mkdir -v -p $DEST
fi
 
cd $TMPDIR
echo "Downloding extra..."
wget --no-verbose -O xtra.zip $XTRAURL
unzip -qq xtra.zip
 
ls -d ./*.AdiumMessageStyle/ > themes_to_copy.lst
num_bytes=`wc -c themes_to_copy.lst | sed 's# themes_to_copy.lst##'`
 
if [ $num_bytes = 0 ]
then
echo "No themes found in downloaded file"
else
while read line
do
echo cp -r \'$line\' "$DEST" | sh
done < themes_to_copy.lst
echo
echo "Theme $XTRAURL was succesfully installed to $DEST"
fi
rm xtra.zip
rm -r $TMPDIR
fi
exit 0
gistfile2.sh
Shell
1 2 3
gconftool-2 -t string -s /desktop/gnome/url-handlers/adiumxtra/command "/usr/local/bin/adiumxtra-install %s"
gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/enabled true
gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/needs_terminal false

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.