forked from josephsenior/Grinta-Coding-Agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_here.sh
More file actions
executable file
·50 lines (45 loc) · 978 Bytes
/
Copy pathstart_here.sh
File metadata and controls
executable file
·50 lines (45 loc) · 978 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
# Grinta unified Unix launcher (source checkout or pipx install).
#
# Auto-selects the flow:
# - Source checkout (uv sync + uv run) when pyproject.toml is present
# - pipx install (grinta on PATH) otherwise
#
# Override:
# ./start_here.sh --pipx # force pipx flow from a source checkout
# ./start_here.sh --source # force source flow
#
# Implementation: scripts/launch/
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
LAUNCH="$ROOT/scripts/launch"
use_pipx=""
args=()
while [[ $# -gt 0 ]]; do
case "$1" in
--pipx)
use_pipx=1
shift
;;
--source)
use_pipx=0
shift
;;
*)
args+=("$1")
shift
;;
esac
done
if [[ -z "$use_pipx" ]]; then
if [[ -f "$ROOT/pyproject.toml" ]]; then
use_pipx=0
else
use_pipx=1
fi
fi
if [[ "$use_pipx" -eq 1 ]]; then
exec bash "$LAUNCH/start_here_pipx.sh" "${args[@]}"
else
exec bash "$LAUNCH/start_here.sh" "${args[@]}"
fi