mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
Refactor lint tooling and shell scripts
This commit is contained in:
48 files changed
+1586
-1107
No files matched your search
+24
-24
@@ -6,38 +6,38 @@ set -euo pipefail
|
||||
EXTRA="${1:-}"
|
||||
|
||||
retry() {
|
||||
local attempts=7
|
||||
local delay=20
|
||||
local count=1
|
||||
local attempts=7
|
||||
local delay=20
|
||||
local count=1
|
||||
|
||||
while true; do
|
||||
if "$@"; then
|
||||
return 0
|
||||
fi
|
||||
while true; do
|
||||
if "$@"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ $count -ge $attempts ]]; then
|
||||
echo "❌ Command failed after ${attempts} attempts."
|
||||
return 1
|
||||
fi
|
||||
if [[ $count -ge $attempts ]]; then
|
||||
echo "❌ Command failed after ${attempts} attempts."
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "⚠️ Attempt ${count}/${attempts} failed. Retrying in ${delay}s..."
|
||||
sleep "${delay}"
|
||||
((count++))
|
||||
done
|
||||
echo "⚠️ Attempt ${count}/${attempts} failed. Retrying in ${delay}s..."
|
||||
sleep "${delay}"
|
||||
((count++))
|
||||
done
|
||||
}
|
||||
|
||||
install_python_deps() {
|
||||
echo "📦 Installing Python dependencies"
|
||||
echo "📦 Installing Python dependencies"
|
||||
|
||||
retry "${PYTHON}" -m pip install --upgrade pip setuptools wheel
|
||||
retry "${PYTHON}" -m pip install --upgrade pip setuptools wheel
|
||||
|
||||
if [[ -n "${EXTRA}" ]]; then
|
||||
echo "→ Installing with extras: [${EXTRA}]"
|
||||
retry "${PYTHON}" -m pip install -e ".[${EXTRA}]"
|
||||
else
|
||||
echo "→ Installing base package"
|
||||
retry "${PYTHON}" -m pip install -e .
|
||||
fi
|
||||
if [[ -n "${EXTRA}" ]]; then
|
||||
echo "→ Installing with extras: [${EXTRA}]"
|
||||
retry "${PYTHON}" -m pip install -e ".[${EXTRA}]"
|
||||
else
|
||||
echo "→ Installing base package"
|
||||
retry "${PYTHON}" -m pip install -e .
|
||||
fi
|
||||
}
|
||||
|
||||
install_python_deps
|
||||
Reference in new issue
Block a user