Skip to content

Commit 423be8a

Browse files
committed
added backend script
1 parent 8ad29f3 commit 423be8a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

backend/script.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
REPO_URL="https://github.com/AOSSIE-Org/EduAid.git"
4+
S2V_URL="https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz"
5+
REPO_DIR="EduAid"
6+
S2V_ARCHIVE="s2v_reddit_2015_md.tar.gz"
7+
S2V_DIR="s2v_old"
8+
9+
if [ ! -d "venv" ]; then
10+
python3 -m venv venv
11+
fi
12+
source venv/bin/activate
13+
14+
if [ ! -d "$REPO_DIR" ]; then
15+
git clone $REPO_URL
16+
fi
17+
18+
if [ ! -f "$S2V_ARCHIVE" ]; then
19+
wget $S2V_URL -O $S2V_ARCHIVE
20+
fi
21+
22+
if [ ! -d "$REPO_DIR/$S2V_DIR" ]; then
23+
mkdir -p $REPO_DIR/$S2V_DIR
24+
tar -xzvf $S2V_ARCHIVE -C $REPO_DIR/$S2V_DIR --strip-components=1
25+
fi
26+
27+
# Deactivate virtual environment after completion
28+
source deactivate

0 commit comments

Comments
 (0)