@@ -12,6 +12,7 @@ echo -e "Installing lichen... "
12
12
13
13
lichen_repository_dir=/usr/local/submitty/GIT_CHECKOUT/Lichen
14
14
lichen_installation_dir=/usr/local/submitty/Lichen
15
+ lichen_vendor_dir=/usr/local/submitty/Lichen/vendor
15
16
16
17
17
18
# #######################################################################################################################
@@ -29,17 +30,17 @@ pip install -r ${lichen_repository_dir}/requirements.txt
29
30
# #######################################################################################################################
30
31
# get tools/source code from other repositories
31
32
32
- mkdir -p vendor /nlohmann
33
+ mkdir -p ${lichen_vendor_dir} /nlohmann
33
34
34
35
NLOHMANN_JSON_VERSION=3.9.1
35
36
36
37
echo " Checking for nlohmann/json: ${NLOHMANN_JSON_VERSION} "
37
38
38
- if [ -f vendor /nlohmann/json.hpp ] && head -n 10 vendor /nlohmann/json.hpp | grep -q " version ${NLOHMANN_JSON_VERSION} " ; then
39
+ if [ -f ${lichen_vendor_dir} /nlohmann/json.hpp ] && head -n 10 ${lichen_vendor_dir} /nlohmann/json.hpp | grep -q " version ${NLOHMANN_JSON_VERSION} " ; then
39
40
echo " already installed"
40
41
else
41
42
echo " downloading"
42
- wget -O vendor /nlohmann/json.hpp https://github.com/nlohmann/json/releases/download/v${NLOHMANN_JSON_VERSION} /json.hpp > /dev/null
43
+ wget -O ${lichen_vendor_dir} /nlohmann/json.hpp https://github.com/nlohmann/json/releases/download/v${NLOHMANN_JSON_VERSION} /json.hpp > /dev/null
43
44
fi
44
45
45
46
# #######################################################################################################################
@@ -51,7 +52,7 @@ mkdir -p ${lichen_installation_dir}/tools/assignments
51
52
# --------------------
52
53
# plaintext tool
53
54
pushd ${lichen_repository_dir} > /dev/null
54
- clang++ -I vendor/ -std=c++11 -Wall tokenizer/plaintext/plaintext_tokenizer.cpp -o ${lichen_installation_dir} /bin/plaintext_tokenizer.out
55
+ clang++ -I ${lichen_vendor_dir} -std=c++11 -Wall tokenizer/plaintext/plaintext_tokenizer.cpp -o ${lichen_installation_dir} /bin/plaintext_tokenizer.out
55
56
if [ $? -ne 0 ]; then
56
57
echo -e " ERROR: FAILED TO BUILD PLAINTEXT TOKENIZER\n"
57
58
exit 1
@@ -62,7 +63,7 @@ popd > /dev/null
62
63
# -------------------------------------------
63
64
# compile & install the hash comparison tool
64
65
pushd ${lichen_repository_dir} > /dev/null
65
- clang++ -I vendor/ -lboost_system -lboost_filesystem -Wall -g -std=c++11 -Wall compare_hashes/compare_hashes.cpp -o ${lichen_installation_dir} /bin/compare_hashes.out
66
+ clang++ -I ${lichen_vendor_dir} -lboost_system -lboost_filesystem -Wall -g -std=c++11 -Wall compare_hashes/compare_hashes.cpp -o ${lichen_installation_dir} /bin/compare_hashes.out
66
67
if [ $? -ne 0 ]; then
67
68
echo -e " ERROR: FAILED TO BUILD HASH COMPARISON TOOL\n"
68
69
exit 1
0 commit comments