Commit 623f530c authored by Benedikt Vollmerhaus's avatar Benedikt Vollmerhaus

Fix installation order, Improve error handling

parent 8f8e279f
......@@ -5,10 +5,31 @@
# Author: Benedikt Vollmerhaus
# License: MIT
read -r -p "Install Python dependencies for scripts submodule? [Y/n] " choice
if [[ $choice =~ ^[Yy]$ ]]; then
NC='\033[0m'
RED='\033[31m'
BLUE='\033[34m'
check_pip_available() {
if ! command -v pip >/dev/null 2>&1; then
printf "[ ${RED}Error${NC} ] pip was not found on the system.\\n"
printf "Please install it and run ${BLUE}./install${NC} again.\\n"
false
fi
return
}
install_pip_packages() {
if pip install --user -q -r scripts/requirements.txt; then
printf "Successfully installed dependencies for all Python scripts.\\n"
printf "System packages may require manual installation; see README.\\n"
fi
}
printf "Install Python dependencies for scripts submodule? [Y/n] "
read -r choice
if echo "$choice" | grep -Eq '^[Yy]?$'; then
if check_pip_available; then
install_pip_packages
fi
fi
......@@ -5,6 +5,9 @@
- clean: ['~']
- shell:
- [git submodule update --init --recursive, "Pulling submodules"]
- link:
~/.config/i3/config: config/i3/config
~/.config/i3/auto_remove_urgency.py: scripts/scripts/auto_remove_urgency.py
......@@ -22,9 +25,7 @@
~/.Xresources: Xresources
- shell:
- [git submodule update --init --recursive, "1) Pulling submodules"]
- command: ./install-tasks
stdin: true
stdout: true
stderr: true
description: "2)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment