Skip to content

Commit

Permalink
Added a help message
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg0 committed Jul 9, 2024
1 parent b6f4206 commit 83f5c24
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions contain
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@



# "Parse"
USAGE="Usage: $0 program arg1 arg2 ...
Prevent 'program' from spawning child processes that persist after it exits.
See https://github.com/BYUHPC/contain for details."
[[ "$1" = -h || "$1" = --help ]] && echo "$USAGE" && exit



# Create container directory and environment file
container="$(mktemp -d -t contain-rootfs-XXXXXX)"
container_env="${container/rootfs/environment}"
printenv > "$container_env"
trap 'rm -rf "$container" "$container_env"' EXIT
trap 'rm -rf "$container"' EXIT



# Environment variables to be passed to the container
# Environment variables to be passed into the container
envvars=()
while IFS= read -r -d '' VAR; do
# Apptainer can't handle funky variable names :/
Expand Down

0 comments on commit 83f5c24

Please sign in to comment.