Skip to content

Commit

Permalink
added backend script
Browse files Browse the repository at this point in the history
  • Loading branch information
Roaster05 committed Aug 12, 2024
1 parent 8ad29f3 commit 423be8a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions backend/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

REPO_URL="https://github.com/AOSSIE-Org/EduAid.git"
S2V_URL="https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz"
REPO_DIR="EduAid"
S2V_ARCHIVE="s2v_reddit_2015_md.tar.gz"
S2V_DIR="s2v_old"

if [ ! -d "venv" ]; then
python3 -m venv venv
fi
source venv/bin/activate

if [ ! -d "$REPO_DIR" ]; then
git clone $REPO_URL
fi

if [ ! -f "$S2V_ARCHIVE" ]; then
wget $S2V_URL -O $S2V_ARCHIVE
fi

if [ ! -d "$REPO_DIR/$S2V_DIR" ]; then
mkdir -p $REPO_DIR/$S2V_DIR
tar -xzvf $S2V_ARCHIVE -C $REPO_DIR/$S2V_DIR --strip-components=1
fi

# Deactivate virtual environment after completion
source deactivate

0 comments on commit 423be8a

Please sign in to comment.