-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.sh
executable file
·39 lines (30 loc) · 1.21 KB
/
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
36
37
38
39
#!/usr/bin/env bash
function install() {
# Find a compatible version of pip
if command -v pip &>/dev/null && pip --version 2>&1 | grep -q -E "python.*3\.[8-9]|python.*3\.(1[0-1])"; then
PIP=pip
elif command -v pip3 &>/dev/null && pip3 --version 2>&1 | grep -q -E "python.*3\.[8-9]|python.*3\.(1[0-1])"; then
PIP=pip3
else
echo "Minitrino requires Python 3.8+. Please install a compatible Python version and ensure Pip points to it."
exit 1
fi
# Set verbose if "-v" is passed
if [[ $1 == "-v" ]]; then
set -ex
else
set -e
fi
# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Check for pyproject.toml dependencies
"${PIP}" install -q --upgrade pip setuptools wheel
echo "Installing Minitrino CLI and test modules..."
"${PIP}" install -q --editable "${SCRIPT_DIR}/src/cli/" --use-pep517
"${PIP}" install -q --editable "${SCRIPT_DIR}/src/test/" --use-pep517
}
time install "$1"
echo -e "\nInstallation complete! Start with the CLI by configuring it with 'minitrino config' \
(you can do this later). Alternatively, get started immediately with 'minitrino provision'.\n"
minitrino
echo -e "\n"