/
Doggich
/
CodeRepresentation
Обзор
Документация
Войти
/
Doggich
/
CodeRepresentation
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
startup.sh
41 строка
1 KB
Doggich
add: expoter.py, startup scripts; refactoring: README.md
10 янв 2026, 11:06
10 янв 2026, 11:06
99c0188
Код
Авторство
О чём код?
#!/bin/bash if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then echo "This script works only on Linux/macOS!" read -p "Press any key to exit..." exit 1 fi if ! command -v python3 &> /dev/null; then echo "Python 3 not found! Install Python 3 and add to PATH." read -p "Press any key to exit..." exit 1 else python_version=$(python3 --version 2>&1) echo "Found Python: $python_version" fi venv_path="./.git_venv" if [ ! -d "$venv_path" ]; then echo "Creating virtual environment..." python3 -m venv "$venv_path" fi echo "Activating virtual environment..." source "$venv_path/bin/activate" current_python=$(which python3) if [[ "$current_python" == *"$venv_path"* ]]; then echo "Success! Virtual environment activated." else echo "Warning: Virtual environment might not be activated." echo "Run manually: source $venv_path/bin/activate" fi if [ -f "requirements.txt" ]; then pip install -r requirements.txt fi echo "Done!" read -p "Press any key to continue..." clear