diff --git a/builder_docker/image-chroot.sh b/builder_docker/image-chroot.sh index 75b532c0..ac15a027 100755 --- a/builder_docker/image-chroot.sh +++ b/builder_docker/image-chroot.sh @@ -117,10 +117,10 @@ umount_system() { # Repeat 5 times for i in {1..5}; do umount -fR $1 \ - && (echo_stamp "OK" "SUCCESS"; umount_ok=true; break) \ + && umount_ok=true && break \ || (echo_stamp "Failed #$i (try 5 times)" "ERROR"; sleep 2) done - [[ "$umount_ok" == true ]] \ + [[ "$umount_ok" == true ]] && echo_stamp "OK" "SUCCESS" \ || (echo_stamp "Umount loop-image was failed" "ERROR"; exit 1) losetup -d $2 } diff --git a/builder_scripts/ros_install.sh b/builder_scripts/ros_install.sh index 4205b63e..ddfc36ff 100755 --- a/builder_scripts/ros_install.sh +++ b/builder_scripts/ros_install.sh @@ -50,7 +50,7 @@ resolve_rosdep() { for i in {1..5}; do # Resolving Dependencies with rosdep rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION} \ - && (install_ok=true; break) || (echo_stamp "rosdep iteration #$i failed!" "ERROR"; sleep 2) + && install_ok=true && break || (echo_stamp "rosdep iteration #$i failed!" "ERROR"; sleep 2) done set -e # Stage fail if this condition is not true