diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-13 21:37:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-13 21:50:59 +0300 |
commit | 6745314fa8a15833c423e017db7b10b6b44f09b6 (patch) | |
tree | 5708881b9ca29d44ad60d11213c794255b26418c /build | |
parent | 94cdf41d9f077de4dbccb8c155d388aae25e2f93 (diff) | |
download | evol-tools-6745314fa8a15833c423e017db7b10b6b44f09b6.tar.gz evol-tools-6745314fa8a15833c423e017db7b10b6b44f09b6.tar.bz2 evol-tools-6745314fa8a15833c423e017db7b10b6b44f09b6.tar.xz evol-tools-6745314fa8a15833c423e017db7b10b6b44f09b6.zip |
build: add script for build local server binaries in chroot.
update server-bin script for bin subdir.
Diffstat (limited to 'build')
-rwxr-xr-x | build/chroot-server-build.sh | 29 | ||||
-rwxr-xr-x | build/server-bin.sh | 13 |
2 files changed, 37 insertions, 5 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 diff --git a/build/server-bin.sh b/build/server-bin.sh index 923d9cb..b81ce8f 100755 --- a/build/server-bin.sh +++ b/build/server-bin.sh @@ -1,13 +1,15 @@ #!/bin/bash +export $LOCALDIR="../server-local/bin" cd ../../server-code make clean ./build.sh static if [[ $? == 0 ]]; then - cp -f char-server ../server-local - cp -f login-server ../server-local - cp -f map-server ../server-local + cp -f char-server $LOCALDIR + cp -f login-server $LOCALDIR + cp -f map-server $LOCALDIR + cp -f mapcache $LOCALDIR else echo Build failed exit 1 @@ -23,9 +25,10 @@ make -j3 cd .. if [[ $? == 0 ]]; then - mkdir ../../../server-local/plugins - cp -f build/src/.libs/*.so ../../../server-local/plugins + mkdir ../../../server-local/bin/plugins + cp -f build/src/.libs/*.so ../../../server-local/bin/plugins echo Build success else echo Build failed + exit 1 fi |