2021-05-18 01:19:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
build_rust() {
|
2021-05-18 01:52:55 +00:00
|
|
|
docker build --pull -t registry.sivert.pw/build/rust:latest rust
|
2021-05-18 01:19:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
push_rust() {
|
2021-05-18 01:52:55 +00:00
|
|
|
docker push registry.sivert.pw/build/rust:latest
|
2021-05-18 01:19:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_and_push_rust() {
|
|
|
|
build_rust
|
|
|
|
push_rust
|
|
|
|
}
|
|
|
|
|
|
|
|
echo ''
|
|
|
|
echo ' --- image-builder.sh (6000) ---'
|
|
|
|
echo ''
|
|
|
|
echo ' 0 - exit'
|
|
|
|
echo ''
|
|
|
|
echo ' # rust'
|
|
|
|
echo ' 1 - build'
|
|
|
|
echo ' 2 - both'
|
|
|
|
echo ' 3 - push'
|
|
|
|
echo ''
|
|
|
|
|
|
|
|
# TODO: add submenus for more build images
|
|
|
|
loop() {
|
|
|
|
echo -n 'what numba? '
|
|
|
|
read -r todo
|
|
|
|
case $todo in
|
|
|
|
'0') exit 0 ;;
|
|
|
|
'1') build_rust ;;
|
|
|
|
'2') build_and_push_rust ;;
|
|
|
|
'3') push_rust ;;
|
|
|
|
*) loop && exit 0;; # sus
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
loop
|