#!/bin/bash

if [[ ! $2 ]] ; then
    echo "Please specify a directory such as ../mywiki or /tmp/mywiki along"
    echo "with the name of the theme into which the CategoryMenu styles will be"
    echo "copied."
    echo
    echo "The specified directory should be the root of your Wiki resources"
    echo "and contain the different theme resources directories, such as classic,"
    echo "modern, hypermodern, and so on, each containing css and img directories."
    echo
    echo "The specified directory may be called htdocs, but sometimes it is called"
    echo "something like moin_static160."
    echo
    echo "In more recent versions of MoinMoin, the htdocs directory is found within"
    echo "a shared directory such as ../moin/share/moin or /tmp/moin/share/moin,"
    echo "and you should specify the htdocs directory in this location instead."
    echo "For example: ../moin/share/moin/htdocs"
    echo
    echo "You may wish to uncomment and modify the chown command in this script."
    exit
fi

cp -i css/*.css $1/$2/css/
#chown www-data: $1/$2/css/
echo "Don't forget to update the screen.css file:"
echo $1/$2/css/screen.css
echo
echo "See the README.txt file for details."
