43 lines
891 B
Fish
Executable file
43 lines
891 B
Fish
Executable file
#!/usr/bin/env fish
|
|
|
|
# This script is meant to be executed inside the repo root.
|
|
|
|
set_color --bold yellow
|
|
echo "###########"
|
|
echo "## Build ##"
|
|
echo "###########"
|
|
set_color
|
|
|
|
cross build --release \
|
|
--package showbits-thermal-printer \
|
|
--target aarch64-unknown-linux-gnu
|
|
or return 1
|
|
|
|
echo
|
|
|
|
set_color --bold yellow
|
|
echo "############"
|
|
echo "## Upload ##"
|
|
echo "############"
|
|
set_color
|
|
|
|
rsync -vP \
|
|
meta/spinch/showbits-thermal-printer.service \
|
|
meta/spinch/showbits-thermal-printer-tunnel.service \
|
|
target/aarch64-unknown-linux-gnu/release/showbits-thermal-printer \
|
|
bondrucker@spinch:
|
|
or return 1
|
|
|
|
echo
|
|
|
|
set_color --bold yellow
|
|
echo "#############"
|
|
echo "## Restart ##"
|
|
echo "#############"
|
|
set_color
|
|
|
|
ssh root@spinch "\
|
|
systemctl daemon-reload \
|
|
&& systemctl restart showbits-thermal-printer.service \
|
|
&& systemctl restart showbits-thermal-printer-tunnel.service \
|
|
"
|