3 # Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
7 function get_env_value
()
14 result
=$
(grep "$key" < "$env_file")
16 if [ $ret -eq 1 ]; then
17 echo "invalid_value_extraction"
20 # Strip the key using bash substring removal.
21 # This remove all leading chars until the actual value.
24 # Remove the trailing ';'
27 # Remove enclosing '"' if present
28 if [ "${result:0:1}" == '"' ]; then
37 function iso8601_to_lttng_dir_datetime
()
43 # Remove trailing timezone information including the '-'.