3 # GNU AGPLv3 (or later at your option)
4 # see bottom for more license info.
5 # please keep this notice.
6 # This file is part of coding-replay.
11 project
="$(basename "$
(pwd)")"
14 if ! git diff-index
--quiet HEAD
--\
16 ! git ls-files
--other --directory --exclude-standard |
sed q1
;
18 datetime
=$
(date -u '+%Y-%m-%d-%H-%M-%S.%N')
20 temp_project_dir
="${project}-${datetime}-${uuid}"
21 cd .. ||
exit 1 # in case cd fails
22 cp -r "${project}" "${temp_project_dir}"
23 cd "${temp_project_dir}" ||
exit 1 # in case cd fails
25 cd "../${project}" ||
exit 1 # in case cd fails
27 git commit
-am "${uuid}
31 cd .. ||
exit 1 # in case cd fails
32 rm -rf "${temp_project_dir}"
33 cd "${project}" ||
exit 1 # in case cd fails
37 # coding-replay is free software: you can redistribute it and/or modify it
38 # under the terms of the GNU Affero General Public License as published
39 # by the Free Software Foundation, either version 3 of the License, or
40 # (at your option) any later version.
42 # coding-replay is distributed in the hope that it will be useful, but
43 # WITHOUT ANY WARRANTY; without even the implied warranty of
44 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 # GNU Affero General Public License for more details.
47 # You should have received a copy of the GNU Affero General Public
48 # License along with coding-replay. If not, see
49 # <http://www.gnu.org/licenses/>.