#!/bin/sh
T=/home/www/libx.org/editions/msu
test -d $T || echo This works only on a machine where $T exists
test -d $T || exit
cp libx-msu.xpi $T
cp update.rdf $T
cp msuspartan.ico $T
cp config $T

echo I have copied the files for this edition to the /home/www/libx.org/editions/msu/ directory

test -r $T/.htaccess && echo $T/.htaccess exists, please check for correctness of edition URL
test -r $T/.htaccess || echo No $T/.htaccess file found, will create a default one.

test -r $T/.htaccess || cat > $T/.htaccess << HTACCESSFILE
AddType application/x-xpinstall .xpi
Redirect /editions/msu/libx.html http://libx.org/editions/download.php?edition=msu
HTACCESSFILE

cat << BEGINHTACCESS
----- begin of .htaccess file -----
BEGINHTACCESS

test -r $T/.htaccess && cat $T/.htaccess
cat << ENDHTACCESS
----- end of .htaccess file -----

Do not forget to add this edition to /home/www/libx.org/editions/editions.list
if it is to be shown on the libx.org main page
ENDHTACCESS

