File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 4545 @echo " 'LANG' argument is only required the first time until the exit command is executed."
4646 @echo
4747
48+ .git/hooks/pre-commit :
49+ @echo " #!/bin/sh\n\
50+ \n\
51+ if test -f \"./.langs\"; then\n\
52+ echo \"Error : You can't commit without exiting development mode.\\\n\\\n\\\\\
53+ \nTry the following command to exit development mode :\\\n\\\n\\\\\
54+ \n$$ make exit\\\n\" 1>&2;\n\
55+ exit 1\n\
56+ fi\n" > ./.git/hooks/pre-commit
57+ @chmod u+x ./.git/hooks/pre-commit
58+
4859node_modules :
4960 @npm install
5061
@@ -56,7 +67,7 @@ check: package.json book.json LANGS.md
5667 false ; \
5768 fi
5869
59- setup : node_modules check
70+ setup : node_modules check .git/hooks/pre-commit
6071 @if ! test -f " .langs" ; then\
6172 cp LANGS.md .langs && \
6273 echo " $( LANG_DATA) " > LANGS.md && \
8596exit :
8697 @if test -f " .langs" ; then\
8798 mv -f .langs LANGS.md && echo " Language file is restored" ; \
88- rm -rf node_modules _book && echo " The project exited development mode." ; \
99+ rm -rf node_modules _book .git/hooks/pre-commit && echo " The project exited development mode." ; \
89100 fi
90101
91102pdf :
You can’t perform that action at this time.
0 commit comments