#!/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