40 lines
1.3 KiB
Bash
40 lines
1.3 KiB
Bash
|
#!/bin/bash
|
||
|
# Includes BmsTunnel, c#-Controller, EmuMeter, OpenVPN and fzsonick + our scripts
|
||
|
#Find filesizes: du -hsx /data/* | sort -r | head -n 40
|
||
|
|
||
|
csprojects=(
|
||
|
BmsTunnel
|
||
|
CsController
|
||
|
EmuMeter
|
||
|
TestBatteryDbus
|
||
|
)
|
||
|
rm -rf deploy/*
|
||
|
rm -rf scripts/*
|
||
|
|
||
|
cp -rf ../firmware/etc ./deploy
|
||
|
cp -rf ../firmware/opt ./deploy
|
||
|
cp -rf ../firmware/service ./deploy
|
||
|
mkdir ./deploy/opt/victronenergy
|
||
|
|
||
|
#Find and build all csprojects, move them to deploy
|
||
|
for proj in "${csprojects[@]}"; do
|
||
|
dotnet publish ../csharp/app/"$proj"/"$proj".csproj -c "Release" -r "linux-arm" -p:PublishSingleFile=true --self-contained true
|
||
|
mkdir ./deploy/opt/innovenergy/"$proj"
|
||
|
cp ../csharp/app/"$proj"/bin/Release/net6.0/linux-arm/publish/"$proj" ./deploy/opt/innovenergy/"$proj"
|
||
|
cp -rf ../csharp/app/"$proj"/service ./deploy/opt/innovenergy/"$proj"
|
||
|
done
|
||
|
|
||
|
mv -f ./deploy/opt/innovenergy/BmsTunnel/* ./scripts
|
||
|
mv -f ./deploy/opt/innovenergy/TestBatteryDbus/* ./scripts
|
||
|
rmdir ./deploy/opt/innovenergy/BmsTunnel
|
||
|
rmdir ./deploy/opt/innovenergy/TestBatteryDbus
|
||
|
|
||
|
#Get Python files and scripts
|
||
|
cp -rfL ../python/dbus-fzsonick-48tl ./deploy/opt/victronenergy/dbus-fzsonick-48tl
|
||
|
cp -rf ../python/scripts/* ./scripts/
|
||
|
|
||
|
#Get OpenVPN
|
||
|
cp -rf ../firmware/opt/innovenergy/openvpn ./deploy/opt/innovenergy
|
||
|
|
||
|
#Make TAR
|
||
|
tar czf ../venus-data.tar.gz -C ../make_deploy ./* .bashrc
|