From b5042022ac2b5f0183e2c53ad9bdebfa409eb212 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Nov 2014 23:31:18 +0300 Subject: build: fix script. Also add progress messages. --- build/chroot-server-build.sh | 4 ++++ build/server-bin.sh | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/chroot-server-build.sh b/build/chroot-server-build.sh index 5704f5f..3cc5c87 100755 --- a/build/chroot-server-build.sh +++ b/build/chroot-server-build.sh @@ -8,14 +8,17 @@ export SRCDIR="$DSTDIR/server-code" export SRCPLUGINSDIR="$SRCDIR/src/evol/build/src/.libs/" export LOCALDIR="../../server-local/bin" +echo Removing old files... rm -rf "$DSTDIR" mkdir "$DSTDIR" +echo Coping files... 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" +echo Enter chroot... schroot -c "$NAME" --directory "$DSTCHDIR/tools/build/" "server-bin.sh" if [[ $? == 0 ]]; then @@ -27,3 +30,4 @@ if [[ $? == 0 ]]; then cp "$SRCDIR/plugins"/*.so "$LOCALDIR/plugins/" cp -f "$SRCPLUGINSDIR"/*.so "$LOCALDIR/plugins/" fi +echo Exit chroot... diff --git a/build/server-bin.sh b/build/server-bin.sh index b81ce8f..f3cb9fa 100755 --- a/build/server-bin.sh +++ b/build/server-bin.sh @@ -1,11 +1,13 @@ #!/bin/bash -export $LOCALDIR="../server-local/bin" +export LOCALDIR="../server-local/bin" cd ../../server-code +echo Build server... make clean ./build.sh static if [[ $? == 0 ]]; then + echo Copy server binaries... cp -f char-server $LOCALDIR cp -f login-server $LOCALDIR cp -f map-server $LOCALDIR @@ -17,18 +19,21 @@ fi cd src/evol mkdir build +echo Build evol plugin... autoreconf -i cd build make clean ../configure make -j3 -cd .. if [[ $? == 0 ]]; then + cd .. + echo Copy plugin binaries... mkdir ../../../server-local/bin/plugins cp -f build/src/.libs/*.so ../../../server-local/bin/plugins echo Build success else + cd .. echo Build failed exit 1 fi -- cgit v1.2.3-60-g2f50