Skip to content

Commit dbd145e

Browse files
[Bugfix:Plagiarism] Fix install-lichen.sh relative paths (#53)
* Fix relative paths in install_lichen.sh * Update install_lichen.sh
1 parent f45c756 commit dbd145e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

install_lichen.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ echo -e "Installing lichen... "
1212

1313
lichen_repository_dir=/usr/local/submitty/GIT_CHECKOUT/Lichen
1414
lichen_installation_dir=/usr/local/submitty/Lichen
15+
lichen_vendor_dir=/usr/local/submitty/Lichen/vendor
1516

1617

1718
########################################################################################################################
@@ -29,17 +30,17 @@ pip install -r ${lichen_repository_dir}/requirements.txt
2930
########################################################################################################################
3031
# get tools/source code from other repositories
3132

32-
mkdir -p vendor/nlohmann
33+
mkdir -p ${lichen_vendor_dir}/nlohmann
3334

3435
NLOHMANN_JSON_VERSION=3.9.1
3536

3637
echo "Checking for nlohmann/json: ${NLOHMANN_JSON_VERSION}"
3738

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
3940
echo " already installed"
4041
else
4142
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
4344
fi
4445

4546
########################################################################################################################
@@ -51,7 +52,7 @@ mkdir -p ${lichen_installation_dir}/tools/assignments
5152
#--------------------
5253
# plaintext tool
5354
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
5556
if [ $? -ne 0 ]; then
5657
echo -e "ERROR: FAILED TO BUILD PLAINTEXT TOKENIZER\n"
5758
exit 1
@@ -62,7 +63,7 @@ popd > /dev/null
6263
#-------------------------------------------
6364
# compile & install the hash comparison tool
6465
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
6667
if [ $? -ne 0 ]; then
6768
echo -e "ERROR: FAILED TO BUILD HASH COMPARISON TOOL\n"
6869
exit 1

0 commit comments

Comments
 (0)