move command 'image info exists' to just 'image exists'
check for bad environment file formattingmaster
parent
ca857a032a
commit
98e943037c
2
build
2
build
|
@ -39,11 +39,11 @@ case "$1" in
|
||||||
tag) shift 1; image_tag "$@" ;;
|
tag) shift 1; image_tag "$@" ;;
|
||||||
push) shift 1; image_push "$@" ;;
|
push) shift 1; image_push "$@" ;;
|
||||||
delete) shift 1; image_delete "$@" ;;
|
delete) shift 1; image_delete "$@" ;;
|
||||||
|
exists) shift 1; image_exists "$@" ;;
|
||||||
info)
|
info)
|
||||||
shift 1
|
shift 1
|
||||||
case "$1" in
|
case "$1" in
|
||||||
arch) shift 1; image_arch "$@" ;;
|
arch) shift 1; image_arch "$@" ;;
|
||||||
exists) shift 1; image_exists "$@" ;;
|
|
||||||
tags) shift 1; image_tags "$@" ;;
|
tags) shift 1; image_tags "$@" ;;
|
||||||
id) shift 1; image_id "$@" ;;
|
id) shift 1; image_id "$@" ;;
|
||||||
* ) image_info "$@"
|
* ) image_info "$@"
|
||||||
|
|
|
@ -64,6 +64,15 @@ read_env_file() {
|
||||||
local evar
|
local evar
|
||||||
while read line; do
|
while read line; do
|
||||||
evar=$(echo $line | cut -d '=' -f1)
|
evar=$(echo $line | cut -d '=' -f1)
|
||||||
|
if [[ $(echo $(c() { echo $#; }; c $line)) -gt 1 ]];then
|
||||||
|
echo the environment file: $1
|
||||||
|
echo has a format error on this line
|
||||||
|
echo "--------------"
|
||||||
|
echo $line
|
||||||
|
echo "--------------"
|
||||||
|
echo you must correct this before the build can continue
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
if [[ ! ${!evar} ]]; then
|
if [[ ! ${!evar} ]]; then
|
||||||
# echo DECLARE $evar via $line
|
# echo DECLARE $evar via $line
|
||||||
if declare -gx "$(echo "${line}" | sed 's/\"//g' )"; then
|
if declare -gx "$(echo "${line}" | sed 's/\"//g' )"; then
|
||||||
|
|
Loading…
Reference in New Issue