diff options
Diffstat (limited to 'build/chroot-server-build.sh')
-rwxr-xr-x | build/chroot-server-build.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build/chroot-server-build.sh b/build/chroot-server-build.sh new file mode 100755 index 0000000..5704f5f --- /dev/null +++ b/build/chroot-server-build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +export CHROOT="$1" +export NAME=lenny +export DSTCHDIR="$2" +export DSTDIR="$CHROOT$DSTCHDIR" +export SRCDIR="$DSTDIR/server-code" +export SRCPLUGINSDIR="$SRCDIR/src/evol/build/src/.libs/" +export LOCALDIR="../../server-local/bin" + +rm -rf "$DSTDIR" +mkdir "$DSTDIR" + +cp -r ../../server-code "$DSTDIR/server-code" +cp -r ../../server-data "$DSTDIR/server-data" +cp -r ../../server-local "$DSTDIR/server-local" +cp -r ../../tools "$DSTDIR/tools" + +schroot -c "$NAME" --directory "$DSTCHDIR/tools/build/" "server-bin.sh" + +if [[ $? == 0 ]]; then + cp "$SRCDIR/char-server" "$LOCALDIR" + cp "$SRCDIR/login-server" "$LOCALDIR" + cp "$SRCDIR/map-server" "$LOCALDIR" + cp "$SRCDIR/mapcache" "$LOCALDIR" + mkdir "$LOCALDIR/plugins/" + cp "$SRCDIR/plugins"/*.so "$LOCALDIR/plugins/" + cp -f "$SRCPLUGINSDIR"/*.so "$LOCALDIR/plugins/" +fi |