diff --git a/Makefile b/Makefile index ca20db5..a61ff91 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2022/01/18 15:11:16 by gbaconni #+# #+# # -# Updated: 2022/04/13 08:38:03 by gbaconni ### lausanne.ch # +# Updated: 2022/04/13 08:53:34 by gbaconni ### lausanne.ch # # # # **************************************************************************** # # @@ -99,7 +99,19 @@ else @$(VALGRIND) $(VALGRINDFLAGS) ./$(NAME) "%d" 42 || true endif -git: +update: config online pull + +sync: config online pull + @git status | grep -q 'nothing to commit' || (git add -A && git commit -am "$$(date '+%F %T')" && git push) + +online: + @dig +short vogsphere.baco.net A | grep -q '213\.5\.156\.25' || echo 'vogsphere.baco.net unresolvable' + @nc -vz vogsphere.baco.net 443 2>&1 | grep -qF '443 (https) open' || echo 'vogsphere.baco.net unreachable' + +pull: + @git pull + +config: @git config user.name "gbaconni" @git config user.email "gbaconni@student.42lausanne.ch" @git config pull.rebase false diff --git a/t b/t new file mode 100644 index 0000000..5dd5145 --- /dev/null +++ b/t @@ -0,0 +1,13 @@ + +update: online pull + +sync: online pull + @git status | grep -q 'nothing to commit' || (git add -A && git commit -am "$$(date '+%F %T')" && git push) + +online: + @dig +short vogsphere.baco.net A | grep -q '213\.5\.156\.25' || echo 'vogsphere.baco.net unresolvable' + @nc -vz vogsphere.baco.net 443 2>&1 | grep -qF '443 (https) open' || echo 'vogsphere.baco.net unreachable' + +pull: + @git pull +