-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (33 loc) · 968 Bytes
/
install.sh
File metadata and controls
executable file
·40 lines (33 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Robustly set up ODFEdit virtual environment
# Assumes Python 3.10 framework build is installed
set -e
# ---------------------------
# Configuration
# ---------------------------
PYTHON_BIN=python3
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"
VENV_DIR="$PROJECT_DIR/venv"
# ---------------------------
# Step 1: Remove old venv
# ---------------------------
if [ -d "$VENV_DIR" ]; then
echo "Removing old virtual environment..."
rm -rf "$VENV_DIR"
fi
# ---------------------------
# Step 2: Create new venv
# ---------------------------
echo "Creating virtual environment..."
$PYTHON_BIN -m venv "$VENV_DIR"
# ---------------------------
# Step 3: Activate venv
# ---------------------------
source "$VENV_DIR/bin/activate"
# ---------------------------
# Step 4: Install ODFEdit dependencies
# ---------------------------
echo "Installing ODFEdit dependencies..."
pip install .
echo "ODFEdit setup complete!"
echo "Run with: ./odfedit.sh"