imagebuilder: add nice headings
This commit is contained in:
parent
33ee5849db
commit
39e173e2c6
1 changed files with 28 additions and 0 deletions
|
@ -74,6 +74,11 @@ fi
|
|||
###############################################################################
|
||||
|
||||
case "${subcommand}" in
|
||||
# ██ ██ ███████ ████████
|
||||
# ██ ██ ██ ██
|
||||
# ██ ██ ███████ ██
|
||||
# ██ ██ ██ ██
|
||||
# ███████ ██ ███████ ██
|
||||
list)
|
||||
while read -r filepath; do
|
||||
filepath_stripped="${filepath#"${BASE_PATH}"}";
|
||||
|
@ -85,6 +90,12 @@ case "${subcommand}" in
|
|||
done < <(find "${BASE_PATH}" -maxdepth 1 -type d);
|
||||
;;
|
||||
|
||||
|
||||
# ██████ ██ ██ ██ ██ ██████
|
||||
# ██ ██ ██ ██ ██ ██ ██ ██
|
||||
# ██████ ██ ██ ██ ██ ██ ██
|
||||
# ██ ██ ██ ██ ██ ██ ██ ██
|
||||
# ██████ ██████ ██ ███████ ██████
|
||||
build)
|
||||
imagename="${1}";
|
||||
|
||||
|
@ -108,6 +119,11 @@ case "${subcommand}" in
|
|||
imagetype="$(tr -d "[:blank:]" <"${imagedir}/type.txt")";
|
||||
|
||||
case "${imagetype}" in
|
||||
# ██████ ██████ ██████ ██ ██ ███████ ██████
|
||||
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
# ██ ██ ██ ██ ██ █████ █████ ██████
|
||||
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
# ██████ ██████ ██████ ██ ██ ███████ ██ ██
|
||||
docker)
|
||||
if [[ ! -f "${imagedir}/Dockerfile" ]]; then
|
||||
echo -e "Error: Failed to find a Dockerfile at ${HC}${imagedir}/Dockerfile${RS}.";
|
||||
|
@ -139,6 +155,12 @@ case "${subcommand}" in
|
|||
fi
|
||||
;;
|
||||
|
||||
|
||||
# ██████ █████ ███████ ███████
|
||||
# ██ ██ ██ ██ ██ ██
|
||||
# ██████ ███████ ███████ █████
|
||||
# ██ ██ ██ ██ ██ ██
|
||||
# ██████ ██ ██ ███████ ███████
|
||||
base|base-nopush)
|
||||
builderscript="${imagedir}/${imagename}.sh";
|
||||
if [[ ! -x "${builderscript}" ]]; then
|
||||
|
@ -180,6 +202,12 @@ case "${subcommand}" in
|
|||
task_end "$?";
|
||||
;;
|
||||
|
||||
|
||||
# ██ ██ ███ ██ ██ ██ ███ ██ ██████ ██ ██ ███ ██
|
||||
# ██ ██ ████ ██ ██ ██ ████ ██ ██ ██ ██ ██ ████ ██
|
||||
# ██ ██ ██ ██ ██ █████ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
|
||||
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
|
||||
# ██████ ██ ████ ██ ██ ██ ████ ██████ ███ ███ ██ ████
|
||||
*)
|
||||
echo -e "Error: The image type ${HC}${imagetype}${RS} was not recognised. Currently recognised types: base, base-nopush, docker";
|
||||
exit 4;
|
||||
|
|
Loading…
Reference in a new issue