Skip to content

Commit

Permalink
better getCnf (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio authored Apr 16, 2024
1 parent 434c827 commit 54fcf48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion advanced/Scripts/speedtestmod/mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ setCnf() {
}

getCnf() {
awk -F= -v r="$2" '$1 == r {print $2}' $1
local value=$(grep "^$2=" $1 | cut -d '=' -f 2)
[ -z "$value" ] && value=$(getVersion $2)
echo $value
}

# allow to source the above helper functions without running the whole script
Expand Down

0 comments on commit 54fcf48

Please sign in to comment.