more robust devbox bash script