if [ "$?" -ne 0 ] || [ "$action" != "reboot" ]; then
it looks too difficult to understand. how about the follow:
docker images | grep -wq "$container_name" || { [ "$action" == "reboot" ] || {
this logics is images not exist and action=reboot, not build,
but our purpose is images not exist, build images
Thanks, Yinsi
[ -x build ] && ./build [ -x install ] && ./install }
}
Thanks Yu Chuan
-- 2.23.0