From: daniel watson Date: Sun, 3 Jun 2018 00:12:04 +0000 (-0700) Subject: 8a809b46-cd13-403b-af62-5983d72a0434 X-Git-Url: http://challenge-bot.com/repos/?p=coding-replay;a=commitdiff_plain;h=5570cc7200c1ecadf1e49ab6af2574e3d007e6d3 8a809b46-cd13-403b-af62-5983d72a0434 2018-06-03-00-12-04.376666291 --- 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