-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (19 loc) · 687 Bytes
/
Makefile
File metadata and controls
22 lines (19 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# thanks Tyler (https://github.com/TylerBrock/mongo-hacker/blob/master/Makefile)
install:
@echo "INSTALLATION"
@if grep -q ".mongo-table-view\.js" ~/.mongorc.js ; \
then \
\
echo "mongo-table-view already installed. Ending." ; \
\
else \
echo "linking local index.js to ~/.mongo-table-view.js" ; \
ln -sf "$(CURDIR)/index.js" ~/.mongo-table-view.js ; \
echo "appending a load script to ~/.mongorc.js to load symlinked index file" ; \
echo "var __CURDIR = '$(CURDIR)'; \nload(\"$(HOME)/.mongo-table-view.js\");" >> ~/.mongorc.js; \
fi
check:
@test -n "$$(which npm)" || \
(echo "Need node package manager 'npm' to test mongo-views" && false)
npm install
npm test