mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix stuff reported by shellcheck
This commit is contained in:
parent
28b1bbcc86
commit
fd1cc5e6ce
2 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ _ynh_app_config_apply_one() {
|
||||||
"set__${bind%%(*}" $short_setting $type $bind
|
"set__${bind%%(*}" $short_setting $type $bind
|
||||||
|
|
||||||
elif [[ "$bind" == "null" ]]; then
|
elif [[ "$bind" == "null" ]]; then
|
||||||
continue
|
return
|
||||||
|
|
||||||
# Save in a file
|
# Save in a file
|
||||||
elif [[ "$type" == "file" ]]; then
|
elif [[ "$type" == "file" ]]; then
|
||||||
|
|
|
@ -542,7 +542,7 @@ ynh_read_var_in_file() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove comments if needed
|
# Remove comments if needed
|
||||||
local expression="$(echo "$expression_with_comment" | sed "s@$comments[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")"
|
local expression="$(echo "$expression_with_comment" | sed "s@${comments}[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")"
|
||||||
|
|
||||||
local first_char="${expression:0:1}"
|
local first_char="${expression:0:1}"
|
||||||
if [[ "$first_char" == '"' ]]; then
|
if [[ "$first_char" == '"' ]]; then
|
||||||
|
@ -620,7 +620,7 @@ ynh_write_var_in_file() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove comments if needed
|
# Remove comments if needed
|
||||||
local expression="$(echo "$expression_with_comment" | sed "s@$comments[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")"
|
local expression="$(echo "$expression_with_comment" | sed "s@${comments}[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")"
|
||||||
endline=${expression_with_comment#"$expression"}
|
endline=${expression_with_comment#"$expression"}
|
||||||
endline="$(echo "$endline" | sed 's/\\/\\\\/g')"
|
endline="$(echo "$endline" | sed 's/\\/\\\\/g')"
|
||||||
value="$(echo "$value" | sed 's/\\/\\\\/g')"
|
value="$(echo "$value" | sed 's/\\/\\\\/g')"
|
||||||
|
|
Loading…
Add table
Reference in a new issue