Update nadeko_installer_1_4.sh

This commit is contained in:
Poag 2017-06-07 13:07:14 +01:00 committed by GitHub
parent 0ba8946eeb
commit 68fd58533d

View File

@ -23,7 +23,7 @@ else
exit 1
fi
root=$(pwd)
root=/opt
tempdir=NadekoInstall_Temp
rm -r "$tempdir" 1>/dev/null 2>&1
@ -38,23 +38,14 @@ echo "NadekoBot downloaded."
echo ""
echo "Downloading Nadeko dependencies"
cd $root/$tempdir/NadekoBot/Discord.Net/src/Discord.Net.Core/
dotnet restore 1>/dev/null 2>&1
cd $root/$tempdir/NadekoBot/Discord.Net/src/Discord.Net.Rest/
dotnet restore 1>/dev/null 2>&1
cd $root/$tempdir/NadekoBot/Discord.Net/src/Discord.Net.WebSocket/
dotnet restore 1>/dev/null 2>&1
cd $root/$tempdir/NadekoBot/Discord.Net/src/Discord.Net.Commands/
dotnet restore 1>/dev/null 2>&1
cd $root/$tempdir/NadekoBot/src/NadekoBot/
dotnet restore 1>/dev/null 2>&1
cd $root/$tempdir/NadekoBot
dotnet restore
echo ""
echo "Download done"
echo ""
echo "Building NadekoBot"
cd $root/$tempdir/NadekoBot/src/NadekoBot/
dotnet build --configuration Release 1>/dev/null 2>&1
dotnet build --configuration Release
echo ""
echo "Building done. Moving Nadeko"
@ -71,6 +62,8 @@ else
echo ""
echo "credentials.json copied to the new version"
cp -RT $root/NadekoBot_old/src/NadekoBot/bin/ $root/NadekoBot/src/NadekoBot/bin/ 1>/dev/null 2>&1
cp -RT $root/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data/NadekoBot.db $root/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/NadekoBot.db 1>/dev/null 2>&1
mv -f $root/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data/NadekoBot.db $root/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data/NadekoBot_old.db 1>/dev/null 2>&1
echo ""
echo "Database copied to the new version"
cp -RT $root/NadekoBot_old/src/NadekoBot/data/ $root/NadekoBot/src/NadekoBot/data/ 1>/dev/null 2>&1