forked from somogyijanos/cursor-chat-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
35 lines (29 loc) · 888 Bytes
/
install.sh
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
#!/bin/bash
INSTALL_DIR="/usr/lib/cursor-chat-export"
SCRIPT_NAME="cursor-chat-export"
# Function to check if Python is installed
check_python() {
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is not installed. Please install Python 3 and try again."
exit 1
fi
}
# Function to install dependencies
install_dependencies() {
pip3 install -r requirements.txt --break-system-packages
}
# Function to create the installation directory and copy files
create_install_dir() {
sudo mkdir -p "$INSTALL_DIR"
sudo cp -r chat.py src/ config.yml README.md "$INSTALL_DIR"
sudo cp cursor-chat-export "/usr/bin/$SCRIPT_NAME"
sudo chmod +x "/usr/bin/$SCRIPT_NAME"
}
# Main installation process
main() {
check_python
install_dependencies
create_install_dir
echo "cursor-chat-export has been successfully installed!"
}
main