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
|
case "${subcommand}" in
|
||||||
|
# ██ ██ ███████ ████████
|
||||||
|
# ██ ██ ██ ██
|
||||||
|
# ██ ██ ███████ ██
|
||||||
|
# ██ ██ ██ ██
|
||||||
|
# ███████ ██ ███████ ██
|
||||||
list)
|
list)
|
||||||
while read -r filepath; do
|
while read -r filepath; do
|
||||||
filepath_stripped="${filepath#"${BASE_PATH}"}";
|
filepath_stripped="${filepath#"${BASE_PATH}"}";
|
||||||
|
@ -85,6 +90,12 @@ case "${subcommand}" in
|
||||||
done < <(find "${BASE_PATH}" -maxdepth 1 -type d);
|
done < <(find "${BASE_PATH}" -maxdepth 1 -type d);
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
# ██████ ██ ██ ██ ██ ██████
|
||||||
|
# ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
# ██████ ██ ██ ██ ██ ██ ██
|
||||||
|
# ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
# ██████ ██████ ██ ███████ ██████
|
||||||
build)
|
build)
|
||||||
imagename="${1}";
|
imagename="${1}";
|
||||||
|
|
||||||
|
@ -108,6 +119,11 @@ case "${subcommand}" in
|
||||||
imagetype="$(tr -d "[:blank:]" <"${imagedir}/type.txt")";
|
imagetype="$(tr -d "[:blank:]" <"${imagedir}/type.txt")";
|
||||||
|
|
||||||
case "${imagetype}" in
|
case "${imagetype}" in
|
||||||
|
# ██████ ██████ ██████ ██ ██ ███████ ██████
|
||||||
|
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
# ██ ██ ██ ██ ██ █████ █████ ██████
|
||||||
|
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
# ██████ ██████ ██████ ██ ██ ███████ ██ ██
|
||||||
docker)
|
docker)
|
||||||
if [[ ! -f "${imagedir}/Dockerfile" ]]; then
|
if [[ ! -f "${imagedir}/Dockerfile" ]]; then
|
||||||
echo -e "Error: Failed to find a Dockerfile at ${HC}${imagedir}/Dockerfile${RS}.";
|
echo -e "Error: Failed to find a Dockerfile at ${HC}${imagedir}/Dockerfile${RS}.";
|
||||||
|
@ -139,6 +155,12 @@ case "${subcommand}" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
# ██████ █████ ███████ ███████
|
||||||
|
# ██ ██ ██ ██ ██ ██
|
||||||
|
# ██████ ███████ ███████ █████
|
||||||
|
# ██ ██ ██ ██ ██ ██
|
||||||
|
# ██████ ██ ██ ███████ ███████
|
||||||
base|base-nopush)
|
base|base-nopush)
|
||||||
builderscript="${imagedir}/${imagename}.sh";
|
builderscript="${imagedir}/${imagename}.sh";
|
||||||
if [[ ! -x "${builderscript}" ]]; then
|
if [[ ! -x "${builderscript}" ]]; then
|
||||||
|
@ -180,6 +202,12 @@ case "${subcommand}" in
|
||||||
task_end "$?";
|
task_end "$?";
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
# ██ ██ ███ ██ ██ ██ ███ ██ ██████ ██ ██ ███ ██
|
||||||
|
# ██ ██ ████ ██ ██ ██ ████ ██ ██ ██ ██ ██ ████ ██
|
||||||
|
# ██ ██ ██ ██ ██ █████ ██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██
|
||||||
|
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
|
||||||
|
# ██████ ██ ████ ██ ██ ██ ████ ██████ ███ ███ ██ ████
|
||||||
*)
|
*)
|
||||||
echo -e "Error: The image type ${HC}${imagetype}${RS} was not recognised. Currently recognised types: base, base-nopush, docker";
|
echo -e "Error: The image type ${HC}${imagetype}${RS} was not recognised. Currently recognised types: base, base-nopush, docker";
|
||||||
exit 4;
|
exit 4;
|
||||||
|
|
Loading…
Reference in a new issue