diff options
author | Munyoki Kilyungi | 2025-05-06 20:46:41 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2025-05-06 20:46:41 +0300 |
commit | 32055ca38c3d2807e58e8718a6de39d37b8ad362 (patch) | |
tree | e643bef2434a2f95413ad0004d06075040fc4e45 | |
parent | c16600ea5bdf7bab75c7105c173e8351422e9663 (diff) | |
download | gn-machines-32055ca38c3d2807e58e8718a6de39d37b8ad362.tar.gz |
Make sure that user has the latest guix-channel set up.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-x | genenetwork-local-container.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/genenetwork-local-container.sh b/genenetwork-local-container.sh index 0f873a7..0875625 100755 --- a/genenetwork-local-container.sh +++ b/genenetwork-local-container.sh @@ -66,13 +66,21 @@ log() { } # Check dependencies -for cmd in git guix sudo diff cp; do +for cmd in git guix sudo diff cp grep; do if ! command -v "$cmd" &>/dev/null; then log "ERROR" "Required command '$cmd' not found" exit 1 fi done +guix_output=$(guix describe) +# Check for gn-bioinformatics channel +echo "$guix_output" | grep -q "gn-bioinformatics" +if [ $? = 1 ]; then + log ERROR "$guix_output" + log ERROR "Please make sure your current profile has gn-bioinformatics" + exit 1 +fi # Validate HOME is set if [ -z "${HOME:-}" ]; then log "ERROR" "HOME environment variable is not set" |