35 lines
756 B
Bash
35 lines
756 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
COREDIR="$1"
|
||
|
if [ "x$COREDIR" = "x" ] || ! [ -d "$COREDIR" ]; then
|
||
|
echo "Syntax: $0 main_dir tomcat_dir web_dir"
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
TOMCATDIR="$2"
|
||
|
if [ "x$TOMCATDIR" = "x" ] || ! [ -d "$TOMCATDIR" ]; then
|
||
|
echo "Syntax: $0 main_dir tomcat_dir web_dir"
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
WEBDIR="$3"
|
||
|
if [ "x$WEBDIR" = "x" ] || ! [ -d "$WEBDIR" ]; then
|
||
|
echo "Syntax: $0 main_dir tomcat_dir web_dir"
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
|
||
|
cd `dirname $0`
|
||
|
SRCDIR=`pwd`
|
||
|
cp -Rap server web *-*.sh $COREDIR
|
||
|
|
||
|
cd "$TOMCATDIR"
|
||
|
if [ -L "lwmain.war" ]; then
|
||
|
rm -f lwmain.war lwadmin.war
|
||
|
fi
|
||
|
ln -s "$COREDIR/web/legacyworlds-web-main-"*.war lwmain.war
|
||
|
ln -s "$COREDIR/web/legacyworlds-web-admin-"*.war lwadmin.war
|
||
|
|
||
|
cd $WEBDIR
|
||
|
unzip -o $COREDIR/web/legacyworlds-web-main-*.war "css/*" "js/*" "pjirc/*" "img/*"
|