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 ...@@ -4,26 +4,24 @@ source /etc/profile
## Force environment to be clean ## Force environment to be clean
source /etc/eic-env.sh source /etc/eic-env.sh
piped_args=()
if [ -p /dev/stdin ]; then if [ -p /dev/stdin ]; then
# If we want to read the input line by line # If we want to read the input line by line
while IFS= read line; do while IFS= read line; do
if [ -z "$piped_args" ]; then piped_args+=("${line}")
piped_args="${line}"
else
piped_args="${piped_args}\n${line}"
fi
done done
fi fi
## Fire off bash ## Fire off bash
echo "" echo ""
echo "" echo ""
echo -e "${piped_args}" printf "%s\n" "${piped_args[@]}"
echo "${#piped_args[@]}"
echo "" echo ""
echo "" echo ""
if [ "${piped_args}" ] ; then if [ ${#piped_args[@]} > 0 ]; then
echo -e ${piped_args} | bash printf "%s\n" "${piped_args[@]}" | bash
elif [ $# -gt 0 ]; then elif [ $# -gt 0 ]; then
exec bash -c "$@" exec bash -c "$@"
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment