| 1 |
#!/usr/bin/env bash |
| 2 |
# |
| 3 |
# Copyright 2009-2026 Joshua Bronson. All rights reserved. |
| 4 |
# |
| 5 |
# This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
|
| 9 |
# shellcheck disable=SC1091 |
| 10 |
|
| 11 |
set -euo pipefail |
| 12 |
|
| 13 |
declare -r hint="Hint: Use 'nix develop' to bootstrap a development environment" |
| 14 |
|
| 15 |
for cmd in uv prek; do |
| 16 |
if ! command -v "$cmd" >/dev/null 2>&1; then |
| 17 |
>&2 echo "Error: No '$cmd' on PATH. $hint" |
| 18 |
exit 1 |
| 19 |
fi |
| 20 |
done |
| 21 |
prek install -f |
| 22 |
|
| 23 |
uv sync --all-groups |
| 24 |
echo "Development virtualenv initialized" |