From 5570cc7200c1ecadf1e49ab6af2574e3d007e6d3 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Sat, 2 Jun 2018 17:12:04 -0700 Subject: [PATCH] 8a809b46-cd13-403b-af62-5983d72a0434 2018-06-03-00-12-04.376666291 --- coding-replay.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.30.2