diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-16 00:51:22 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-16 00:51:22 +0100 |
| commit | ae1412fdc283e442a0869aa7d63778449a7e5cfe (patch) | |
| tree | 0f5d5ff124129b3f085ce94d3004622c0d041323 /scripts/generate_rendu.sh | |
| parent | e8a7d07f1c99b5ce6210603d88098580af95fb13 (diff) | |
| download | libft-ae1412fdc283e442a0869aa7d63778449a7e5cfe.tar.gz libft-ae1412fdc283e442a0869aa7d63778449a7e5cfe.tar.bz2 libft-ae1412fdc283e442a0869aa7d63778449a7e5cfe.zip | |
Features toggle to avoid bloat and unauthorized functions, config file, script to generate a rendu branch
Diffstat (limited to 'scripts/generate_rendu.sh')
| -rw-r--r-- | scripts/generate_rendu.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/generate_rendu.sh b/scripts/generate_rendu.sh new file mode 100644 index 0000000..1b68a97 --- /dev/null +++ b/scripts/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" |
