diff options
Diffstat (limited to 'test_mini/libft/script/generate_rendu.sh')
| -rwxr-xr-x | test_mini/libft/script/generate_rendu.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test_mini/libft/script/generate_rendu.sh b/test_mini/libft/script/generate_rendu.sh new file mode 100755 index 0000000..1b68a97 --- /dev/null +++ b/test_mini/libft/script/generate_rendu.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ "$(git status --porcelain)" ] +then + echo "Error: Your working directory isn't clean" + exit +fi + +BASE_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) +RENDU_BRANCH_NAME="rendu-$BASE_BRANCH_NAME" + +if [ -z $(git show-ref --verify --quiet refs/heads/$RENDU_BRANCH_NAME) ] +then + echo "Error: $RENDU_BRANCH_NAME was already generated" + exit +fi + +git checkout -b $RENDU_BRANCH_NAME +RENDU_IGNORE=$(sed -n 's/RENDU_IGNORE=//p') +make fclean +rm -f $RENDU_IGNORE + +# generate makefile strict src + +git add . +git commit --message "Generated commit: creation of rendu for $BASE_BRANCH_NAME" |
