Run Graphify

Path: loom-builder-sol/run_graphify.shRelative: run_graphify.shSubproject: loom-builder-solCategory: scripts
Lines: 38Bytes: 1,608Imports: 0Exports: 0

Content Preview

  1. #!/bin/bash
  2. PYTHON=""
  3. GRAPHIFY_BIN=$(which graphify 2>/dev/null)
  4. if [ -z "$PYTHON" ] && command -v uv >/dev/null 2>&1; then
  5. _UV_PY=$(uv tool run graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null)
  6. if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi
  7. fi
  8. if [ -z "$PYTHON" ] && [ -n "$GRAPHIFY_BIN" ]; then
  9. _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | tr -d "#!")
  10. case "$_SHEBANG" in
  11. *[!a-zA-Z0-9/_.-]*) ;;
  12. *) "$_SHEBANG" -c "import graphify" 2>/dev/null && PYTHON="$