#!/bin/bash build_rust() { docker build --pull -t registry.sivert.pw/build/rust:latest rust } push_rust() { docker push registry.sivert.pw/build/rust:latest } 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