Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Nov 18, 2023
1 parent e744001 commit e1c5eaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rootfs/etc/s6-overlay/scripts/30-set-direwolf-params
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@ if [[ -n "$DW_EXTRA_CONFIGS" ]]; then
for instance in "${configs[@]}"
do
# don't do this -- instance="${instance^^}"
while [[ "${instance:0:1}" == " " ]]; do instance="${instance:1}"; done
param="${instance%%=*}" # all before the first "="
value="${instance#*=}" # all after the first "="
instance="${instance#"${instance%%[![:space:]]*}"}" #strip initial spaces
param="${instance%%[:space:]*}" # all before the first space
value="${instance#*[:space:]}" # all after the first "="
if [[ -z "${instance}" ]]; then
# Instance empty: skip
continue
elif ! grep -qo "=" <<< "$instance"; then
# If there's no "=", don't pass in a parameter
elif ! grep -q '[[:space:]]' <<< "$instance"; then
# If there's no value, don't pass it in
setdwconfig "${param}"
else
setdwconfig "${param}" "${value}"
Expand Down

0 comments on commit e1c5eaf

Please sign in to comment.