File tree 1 file changed +13
-2
lines changed 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 45
45
@echo " 'LANG' argument is only required the first time until the exit command is executed."
46
46
@echo
47
47
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
+
48
59
node_modules :
49
60
@npm install
50
61
@@ -56,7 +67,7 @@ check: package.json book.json LANGS.md
56
67
false ; \
57
68
fi
58
69
59
- setup : node_modules check
70
+ setup : node_modules check .git/hooks/pre-commit
60
71
@if ! test -f " .langs" ; then\
61
72
cp LANGS.md .langs && \
62
73
echo " $( LANG_DATA) " > LANGS.md && \
85
96
exit :
86
97
@if test -f " .langs" ; then\
87
98
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." ; \
89
100
fi
90
101
91
102
pdf :
You can’t perform that action at this time.
0 commit comments