Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed nested git repositories when running setup script #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ backend/credentials.json
backend/token.json
backend/service_account_key.json
venv
backend/Eduaid
backend/Eduaid
s2v_reddit_2015_md.tar.gz
10 changes: 8 additions & 2 deletions backend/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@ fi
source venv/bin/activate

if [ ! -d "$REPO_DIR" ]; then

git clone $REPO_URL
rm -rf "$REPO_DIR/.git"
fi

if [ ! -f "$S2V_ARCHIVE" ]; then
wget $S2V_URL -O $S2V_ARCHIVE
else
echo "Sense2Vec archive already exists, skipping download."
fi

if [ ! -d "$REPO_DIR/$S2V_DIR" ]; then
echo "Extracting Sense2Vec model..."
mkdir -p $REPO_DIR/$S2V_DIR
tar -xzvf $S2V_ARCHIVE -C $REPO_DIR/$S2V_DIR --strip-components=1
else
echo "Sense2Vec model already extracted."
fi

# Deactivate virtual environment after completion
source deactivate
deactivate