mirror of
https://github.com/sigmasternchen/NurseBot
synced 2025-03-16 00:28:58 +00:00
added setup script
This commit is contained in:
parent
ac36fff30c
commit
16780d56e3
1 changed files with 43 additions and 0 deletions
43
setup.sh
Executable file
43
setup.sh
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/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
|
Loading…
Reference in a new issue