-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·30 lines (24 loc) · 852 Bytes
/
install.sh
File metadata and controls
executable file
·30 lines (24 loc) · 852 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
#!/bin/bash
set -e
echo "Installing sbommage..."
# Check if Python is available
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is required but not installed."
echo "Please install Python 3.8 or later and try again."
exit 1
fi
# Check Python version
python_version=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
required_version="3.8"
if ! python3 -c "import sys; exit(0 if sys.version_info >= (3, 8) else 1)"; then
echo "Error: Python $required_version or later is required (found $python_version)"
exit 1
fi
# Install via pip
echo "Installing sbommage from PyPI..."
python3 -m pip install --user sbommage
echo ""
echo "Installation complete!"
echo "You can now run: sbommage <path-to-sbom-file>"
echo ""
echo "Make sure ~/.local/bin is in your PATH to use the sbommage command."