diff --git a/README.md b/README.md index 5a021cb..9eb692c 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ only after reviewing the build results and registry target. ### Run coverage across all repos ```bash bash run_coverage.sh -# Output: ~/Desktop/machine/out/coverage/ +# Output: ${OMNIBIOAI_ROOT:-}/out/coverage/ ``` ### Update all GitHub repo descriptions and topics @@ -257,7 +257,7 @@ Test files live in `tests/`; `pytest.ini` only collects from there. These are the intended schedules, not an installer. Confirm that each referenced repository and script exists on the target machine before adding entries to crontab. Most scripts assume the default root -`~/Desktop/machine`; use their documented arguments or environment variables +`${OMNIBIOAI_ROOT:-}`; use their documented arguments or environment variables where available when deploying on another host. | Time | Script | Purpose | diff --git a/backup-system-state.sh b/backup-system-state.sh index e5441be..4a13220 100755 --- a/backup-system-state.sh +++ b/backup-system-state.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # backup-system-state.sh — Daily backup of spark-70f0's non-git system state # # Backs up: every real .env file across the ecosystem repos, a fresh @@ -41,7 +42,7 @@ set -euo pipefail -MACHINE_DIR="/home/manish/Desktop/machine" +MACHINE_DIR="$OMNIBIOAI_ROOT" BACKUP_DIR="${MACHINE_DIR}/work/backups/system-state" REPO_DIR="/home/manish/.omnibioai-system-backups-repo" PASSPHRASE_FILE="/home/manish/.omnibioai-config-backup-passphrase" diff --git a/build-all-new.sh b/build-all-new.sh index 812454b..1812b8a 100755 --- a/build-all-new.sh +++ b/build-all-new.sh @@ -1,7 +1,8 @@ #!/bin/bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # build-all-new.sh -BASE=/home/manish/Desktop/machine +BASE="$OMNIBIOAI_ROOT" REGISTRY=ghcr.io/omnibioai declare -A SERVICES=( diff --git a/build_all_tools.sh b/build_all_tools.sh index 1426dee..2c8dede 100755 --- a/build_all_tools.sh +++ b/build_all_tools.sh @@ -1,7 +1,8 @@ #!/bin/bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" set -e -MACHINE_DIR="$HOME/Desktop/machine" +MACHINE_DIR="$OMNIBIOAI_ROOT" ECR="068155050939.dkr.ecr.us-east-1.amazonaws.com/omnibioai" REGION="us-east-1" JOB_QUEUE="arn:aws:batch:us-east-1:068155050939:job-queue/omnibioai-jq" diff --git a/build_cython.sh b/build_cython.sh index d7c3c4d..ab379a5 100755 --- a/build_cython.sh +++ b/build_cython.sh @@ -1,10 +1,11 @@ #!/bin/bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # OmniBioAI Cython compilation script # Compiles all HIGH priority files across all repos # Run before building Docker images set -e -MACHINE=~/Desktop/machine +MACHINE="$OMNIBIOAI_ROOT" LOG=$MACHINE/out/cython_build.log mkdir -p $MACHINE/out diff --git a/build_omnibioai_ecosystem.sh b/build_omnibioai_ecosystem.sh index b6e586d..f133f3c 100644 --- a/build_omnibioai_ecosystem.sh +++ b/build_omnibioai_ecosystem.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # utils/build_omnibioai_ecosystem.sh # # Orchestrates a full ecosystem build: @@ -8,11 +9,11 @@ # 4. Build and (re)start omnibioai-studio via docker compose # # Usage: bash omnibioai-utils/build_omnibioai_ecosystem.sh [root_dir] -# Default root: ~/Desktop/machine +# Default root: "$OMNIBIOAI_ROOT" set -euo pipefail -ROOT="${1:-$HOME/Desktop/machine}" +ROOT="${1:-$OMNIBIOAI_ROOT}" RED='\033[0;31m' GREEN='\033[0;32m' @@ -153,4 +154,4 @@ export REDIS_ACL_POLICY_PATH="${REDIS_ACL_POLICY_PATH:-$STUDIO_DIR/config/redis/ ok "✓ omnibioai-studio built and running." echo "" -echo -e "${BOLD}${GREEN}All 4 steps completed successfully.${RESET}" \ No newline at end of file +echo -e "${BOLD}${GREEN}All 4 steps completed successfully.${RESET}" diff --git a/check_platform_workflows.sh b/check_platform_workflows.sh index aa8a82c..1503321 100755 --- a/check_platform_workflows.sh +++ b/check_platform_workflows.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # # check_platform_workflows.sh # @@ -29,7 +30,7 @@ set -uo pipefail -MACHINE_DIR="${1:-$HOME/Desktop/machine}" +MACHINE_DIR="${1:-$OMNIBIOAI_ROOT}" # Falls back to the gh CLI's own stored credentials (gh auth login) when # GH_TOKEN isn't exported -- cron runs with a minimal environment, so this # is what lets this script work unattended instead of failing silently diff --git a/check_unpushed_work.sh b/check_unpushed_work.sh index eb1d916..ecc1574 100755 --- a/check_unpushed_work.sh +++ b/check_unpushed_work.sh @@ -1,4 +1,5 @@ #!/bin/bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # check_unpushed_work.sh # # Cross-repo health check: scans every git repo under ROOT for uncommitted @@ -20,7 +21,7 @@ set -uo pipefail -ROOT="/home/manish/Desktop/machine" +ROOT="$OMNIBIOAI_ROOT" JSON_OUT="" QUIET=false @@ -127,4 +128,4 @@ fi if [ "$UNPUSHED_COUNT" -gt 0 ]; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/clock_count.sh b/clock_count.sh index e6c35dd..737ff9f 100644 --- a/clock_count.sh +++ b/clock_count.sh @@ -1,22 +1,23 @@ +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" cloc \ - ~/Desktop/machine/omnibioai \ - ~/Desktop/machine/omnibioai-landing \ - ~/Desktop/machine/omnibioai-api-gateway \ - ~/Desktop/machine/omnibioai-tes \ - ~/Desktop/machine/omnibioai_sdk \ - ~/Desktop/machine/omnibioai-rag \ - ~/Desktop/machine/omnibioai-toolserver \ - ~/Desktop/machine/omnibioai-model-registry \ - ~/Desktop/machine/omnibioai-dev-hub \ - ~/Desktop/machine/omnibioai-policy-engine \ - ~/Desktop/machine/omnibioai-security-audit \ - ~/Desktop/machine/omnibioai-hpc-policy-engine \ - ~/Desktop/machine/omnibioai-auth \ - ~/Desktop/machine/omnibioai-tool-images \ - ~/Desktop/machine/omnibioai-control-center \ - ~/Desktop/machine/omnibioai-workflow-bundles \ - ~/Desktop/machine/omnibioai-studio \ - ~/Desktop/machine/omnibioai-lims \ + "$OMNIBIOAI_ROOT"/omnibioai \ + "$OMNIBIOAI_ROOT"/omnibioai-landing \ + "$OMNIBIOAI_ROOT"/omnibioai-api-gateway \ + "$OMNIBIOAI_ROOT"/omnibioai-tes \ + "$OMNIBIOAI_ROOT"/omnibioai_sdk \ + "$OMNIBIOAI_ROOT"/omnibioai-rag \ + "$OMNIBIOAI_ROOT"/omnibioai-toolserver \ + "$OMNIBIOAI_ROOT"/omnibioai-model-registry \ + "$OMNIBIOAI_ROOT"/omnibioai-dev-hub \ + "$OMNIBIOAI_ROOT"/omnibioai-policy-engine \ + "$OMNIBIOAI_ROOT"/omnibioai-security-audit \ + "$OMNIBIOAI_ROOT"/omnibioai-hpc-policy-engine \ + "$OMNIBIOAI_ROOT"/omnibioai-auth \ + "$OMNIBIOAI_ROOT"/omnibioai-tool-images \ + "$OMNIBIOAI_ROOT"/omnibioai-control-center \ + "$OMNIBIOAI_ROOT"/omnibioai-workflow-bundles \ + "$OMNIBIOAI_ROOT"/omnibioai-studio \ + "$OMNIBIOAI_ROOT"/omnibioai-lims \ --exclude-dir=node_modules,.venv,__pycache__,migrations,htmlcov,.git,obsolete,locale,data,work,uploads,downloads,results,output,cache,logs,tmp \ --exclude-ext=json,lock,svg,min.js,map,po,pot,txt,csv,log,sql \ --include-lang=Python,JavaScript,TypeScript,CSS,HTML,Shell,R,Dockerfile,YAML,Groovy,JSX,SCSS \ diff --git a/ecosystem_status.sh b/ecosystem_status.sh index 7d8db97..9fe305f 100644 --- a/ecosystem_status.sh +++ b/ecosystem_status.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/ecosystem_path.sh" # utils/ecosystem_status.sh # Check git status for all repos in the OmniBioAI ecosystem # Usage: bash utils/ecosystem_status.sh [root_dir] -# Default root: ~/Desktop/machine +# Default root: $OMNIBIOAI_ROOT SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" DEFAULT_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" @@ -128,4 +129,4 @@ if [ "$non_main" -gt 0 ]; then fi done echo "" -fi \ No newline at end of file +fi