Commit 38268010 authored by Emeric Verschuur's avatar Emeric Verschuur

[settings] create parent settings file directory

parent 14f88ab2
Pipeline #53 passed with stage
in 13 seconds
......@@ -661,6 +661,8 @@ bashopts_process_option() {
if [ -n "$bashopts_tool_settings_path" ]; then
# vrite the value to the setting file
(
test -d "$(dirname $bashopts_tool_settings_path)" || \
mkdir -p "$(dirname $bashopts_tool_settings_path)"
if [ -f "$bashopts_tool_settings_path" ]; then
# remove old value
sed -i "/^$op=/d" $bashopts_tool_settings_path
......
......@@ -163,7 +163,7 @@ _test_case_10() {
}
_test_case_11() {
bashopts_setup -n "$0" -d "Test case $0" -s /this/is/an/inacessible/file
bashopts_setup -n "$0" -d "Test case $0" -s /dev/null/invalid
bashopts_declare -n simple_val -s -l value -d "Simple value" -t string -v 'val'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment