#!/bin/sh
# Regenerate ubuntu-themes tarball without copyrighted trademarks
REVISION=$1
FOLDER=light-themes-bzr$REVISION
ARCHIVE=$FOLDER.tar.xz
bzr export $FOLDER/ -r $REVISION lp:ubuntu-themes
pushd $FOLDER/
# Remove copyrighted logo icons
rm -r distributor-logo.png
find suru-icons/ ubuntu-mobile/ ubuntu-mono-*/ LoginIcons/ \
\( \
-name "computer.*" \
-o -name "dash*.*" \
-o -name "distributor-logo.*" \
-o -name "package-supported.*" \
-o -name "placeholder-app-icon.*" \
-o -name "preferences-system-directory.*" \
-o -name "start-here.*" \
\) -delete
popd
tar -cJf $ARCHIVE $FOLDER/
rm -r $FOLDER/