Skip to content
Snippets Groups Projects
Commit 3a5e8917 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

improve eic-shell

parent b4dc736d
No related branches found
No related tags found
1 merge request!74Fix environment setup for CI usage
This commit is part of merge request !74. Comments created here will be created in the context of that merge request.
......@@ -4,26 +4,24 @@ source /etc/profile
## Force environment to be clean
source /etc/eic-env.sh
piped_args=()
if [ -p /dev/stdin ]; then
# If we want to read the input line by line
while IFS= read line; do
if [ -z "$piped_args" ]; then
piped_args="${line}"
else
piped_args="${piped_args}\n${line}"
fi
piped_args+=("${line}")
done
fi
## Fire off bash
echo ""
echo ""
echo -e "${piped_args}"
printf "%s\n" "${piped_args[@]}"
echo "${#piped_args[@]}"
echo ""
echo ""
if [ "${piped_args}" ] ; then
echo -e ${piped_args} | bash
if [ ${#piped_args[@]} > 0 ]; then
printf "%s\n" "${piped_args[@]}" | bash
elif [ $# -gt 0 ]; then
exec bash -c "$@"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment