Move all meta scripts to central directory

This commit is contained in:
Joscha 2025-03-01 02:27:08 +01:00
parent 84d631a9c3
commit 5d1b740c20
8 changed files with 70 additions and 47 deletions

22
meta/build-typst-plugin Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env fish
set_color --bold yellow
echo "#############"
echo "## Prepare ##"
echo "#############"
set_color
rustup target add wasm32-unknown-unknown
pushd showbits-typst-plugin
echo
set_color --bold yellow
echo "###########"
echo "## Build ##"
echo "###########"
set_color
cargo build --release --target wasm32-unknown-unknown
or return 1

5
meta/clean Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
cargo clean
pushd showbits-typst-plugin
cargo clean

43
meta/spinch/deploy Executable file
View file

@ -0,0 +1,43 @@
#!/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 \
"

View file

@ -1,40 +0,0 @@
#!/usr/bin/env fish
# This script is meant to be executed inside the repo root.
echo "###############"
echo "## Compiling ##"
echo "###############"
cross build --release \
--package showbits-thermal-printer \
--target aarch64-unknown-linux-gnu
or return 1
echo
echo "###############"
echo "## Uploading ##"
echo "###############"
rsync -vP \
showbits-thermal-printer/meta/spinch.service \
bondrucker@spinch:showbits-thermal-printer.service
or return 1
rsync -vP \
showbits-thermal-printer/meta/spinch-tunnel.service \
bondrucker@spinch:showbits-thermal-printer-tunnel.service
or return 1
rsync -vP \
target/aarch64-unknown-linux-gnu/release/showbits-thermal-printer \
bondrucker@spinch:showbits-thermal-printer
or return 1
echo
echo "################"
echo "## Restarting ##"
echo "################"
ssh root@spinch "\
systemctl daemon-reload \
&& systemctl restart showbits-thermal-printer.service \
&& systemctl restart showbits-thermal-printer-tunnel.service \
"

View file

@ -1,4 +0,0 @@
#!/usr/bin/env fish
pushd showbits-typst-plugin
cargo build --release --target wasm32-unknown-unknown

View file

@ -1,3 +0,0 @@
#!/usr/bin/env fish
rustup target add wasm32-unknown-unknown