a guest Oct 28th, 2009 3,151 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # 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 ]
- echo "Usage:"
- echo "`basename $0` adiumxtra://some.url.here/extra"
- exit 1
- TMPDIR=`mktemp --directory`
- XTRAURL=`echo $1 | sed -e "s/^adiumxtra:/http:/"`
- if [ ! -d $DEST ]
- mkdir -v -p $DEST
- 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 ]
- echo "No themes found in downloaded file"
- while read line
- echo cp -r \'$line\' "$DEST" | sh
- done < themes_to_copy.lst
- echo "Theme $XTRAURL was succesfully installed to $DEST"
- rm xtra.zip
- rm -r $TMPDIR
- exit 0
RAW Paste Data