Skip to content

Commit

Permalink
refactor: improve conditional statements in install_config.sh
Browse files Browse the repository at this point in the history
The code changes refactor the conditional statements in the `install_config.sh` file. Instead of checking if `${shortname}` is equal to "dst" or "arma3", it now checks if `${clustercfgdir}` or `${networkcfgdir}` are not empty, respectively. This improves readability and maintainability of the code.
  • Loading branch information
dgibbs64 committed Sep 30, 2023
1 parent 81e5fe6 commit 4389f91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lgsm/modules/install_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Checks if server cfg dir exists, creates it if it doesn't.
fn_check_cfgdir() {
changes=""
if [ "${shortname}" == "dst" ]; then
if [ -n "${clustercfgdir}" ]; then
echo -en "creating config directory [ ${italic}${clustercfgdir}${default} ]"
changes+=$(mkdir -pv "${clustercfgdir}")
elif [ "${shortname}" == "arma3" ]; then
elif [ -n "${networkcfgdir}" ]; then
echo -en "creating config directory [ ${italic}${networkcfgdir}${default} ]"
changes+=$(mkdir -pv "${networkcfgdir}")
else
Expand Down

0 comments on commit 4389f91

Please sign in to comment.