mirror of
https://github.com/sigmasternchen/NurseBot
synced 2025-03-15 16:18:58 +00:00
44 lines
743 B
Bash
44 lines
743 B
Bash
![]() |
#!/bin/bash
|
||
|
|
||
|
directory="$1"
|
||
|
|
||
|
if test "$directory" = ""; then
|
||
|
directory=$(pwd)
|
||
|
fi
|
||
|
|
||
|
pushd $directory
|
||
|
|
||
|
git clone "https://github.com/overflowerror/NurseBot" "git"
|
||
|
|
||
|
mkdir versions
|
||
|
|
||
|
mkdir -p git/build/NurseBot_lib
|
||
|
|
||
|
if test "$(ls git/build/NurseBot_lib)" = ""; then
|
||
|
echo "Libs are missing."
|
||
|
echo "Please copy them to $directory/git/build/NurseBot_lib"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd git/buildtools
|
||
|
|
||
|
./update.sh
|
||
|
./build.sh ../../
|
||
|
if test ! $? = 0; then
|
||
|
echo "Build failed."
|
||
|
popd
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
version=$(./versions.sh ../../ | tail -n 1)
|
||
|
./deploy.sh ../../ $version
|
||
|
|
||
|
cd ../..
|
||
|
|
||
|
cp "$directory"/git/config.properties.default "$directory"/config.propterties
|
||
|
|
||
|
ln -s "$directory"/git/buildtools/nursebot.sh ../../
|
||
|
ln -s "$directory"/git/build/NurseBot_lib ../../
|
||
|
|
||
|
popd
|