Skip to content
Snippets Groups Projects
Forked from containers / eic_container
808 commits behind the upstream repository.
eic-shell 432 B
#!/usr/bin/env bash

piped_args=()
if [ -p /dev/stdin ]; then
  # If we want to read the input line by line
  while IFS= read line; do
    piped_args+=("${line}")
  done
fi

## Properly setup environment
. /etc/eic-env.sh


### Fire off bash
if [ "${#piped_args[@]}" != "0" ]; then
  printf "%s\n" "${piped_args[@]}" | bash -s -- --norc --noprofile
elif [ $# -gt 0 ]; then
  exec bash -c "$@"
else
  exec bash --norc --noprofile
fi