This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/build-tools/deploy.sh

34 lines
756 B
Bash
Executable file

#!/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/*"