-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
27 lines (20 loc) · 1009 Bytes
/
makefile
File metadata and controls
27 lines (20 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
all: prereq pip ext
.SILENT: prereq pip ext
.PHONY: all
prereq:
echo "\n+ Checking if required files present..."
test -f requirements.txt || (echo "\t- requirements.txt not found." && exit "1")
test -f invidx.py || (echo "\t- invidx.py not found." && exit "1")
test -f printdict.py || (echo "\t- [Warn] printdict.py not found.")
test -f vecsearch.py || (echo "\t- vecsearch.py not found." && exit "1")
test -f utils.py || (echo "\t- utils.py not found." && exit "1")
test -f constants.py || (echo "\t- constants.py not found." && exit "1")
test -f README* || (echo "\t- [Warn] README not found.")
test -f design.pdf || (echo "\t- [Warn] design.pdf not found.")
echo "All required files for running the project found.\n\n"
pip:
echo "+ Getting external libraries..."
pip3 install -U -r requirements.txt && echo "Success.\n\n" || exit "2"
ext:
echo "+ Downloading punkt for NLTK"
echo "import nltk\nif nltk.download('punkt'):\n\tprint('Success.')\nelse:\n\tprint('Failed :/')" | python3