From f5092d7613710327114cd97515716bd6d3d642eb Mon Sep 17 00:00:00 2001 From: Joel Savitz Date: Fri, 14 Jun 2024 17:13:44 -0400 Subject: [PATCH] orbit: refactor warpdrive.sh based on chronus/configure.sh Signed-off-by: Joel Savitz --- orbit/warpdrive.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/orbit/warpdrive.sh b/orbit/warpdrive.sh index 19344730..8d92572d 100755 --- a/orbit/warpdrive.sh +++ b/orbit/warpdrive.sh @@ -1,15 +1,9 @@ -#!/bin/sh -e +#!/bin/sh # # the warp drive allows you to enter hyperspace -require() { command -v "$1" > /dev/null || { echo "error: $1 command required yet absent" ; exit 1 ; } ; } +set -e -cd "$(dirname "$0")" +DOCKER_COMPOSE=${DOCKER_COMPOSE:-podman-compose} -DOCKER=${DOCKER:-podman} - -require "${DOCKER}" - -CONTAINER=${CONTAINER:-singularity_orbit_1} - -$DOCKER exec -i "$CONTAINER" ./hyperspace.py "$@" +$DOCKER_COMPOSE exec orbit ./hyperspace.py "$@"