X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=coding-replay.bash;fp=coding-replay.bash;h=4bf81a003a2813c15108c34c3a49adf5644ebb5d;hb=5570cc7200c1ecadf1e49ab6af2574e3d007e6d3;hp=b95c723d668bc42948cc0e398e22de4305277023;hpb=c42a28df91c30a427cc56ab794263f5f95206f0f;p=coding-replay diff --git a/coding-replay.bash b/coding-replay.bash index b95c723..4bf81a0 100755 --- a/coding-replay.bash +++ b/coding-replay.bash @@ -18,19 +18,19 @@ while sleep 1; do datetime=$(date -u '+%Y-%m-%d-%H-%M-%S.%N') uuid=$(uuid -v4) temp_project_dir="${project}-${datetime}-${uuid}" - cd .. + cd .. || exit 1 # in case cd fails cp -r "${project}" "${temp_project_dir}" - cd "${temp_project_dir}" + cd "${temp_project_dir}" || exit 1 # in case cd fails if make test; then - cd "../${project}" + cd "../${project}" || exit 1 # in case cd fails git add . git commit -am "${uuid} ${datetime}" fi - cd .. + cd .. || exit 1 # in case cd fails rm -rf "${temp_project_dir}" - cd "${project}" + cd "${project}" || exit 1 # in case cd fails fi done