Browse Source

install gamedig in lgsm dir if node exists

pull/4510/head
Daniel Gibbs 1 year ago
parent
commit
171d9b45ee
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 7
      lgsm/modules/check.sh
  2. 5
      lgsm/modules/core_modules.sh
  3. 11
      lgsm/modules/install_gamedig.sh

7
lgsm/modules/check.sh

@ -99,3 +99,10 @@ for allowed_command in "${allowed_commands_array[@]}"; do
check_system_requirements.sh
fi
done
allowed_commands_array=(DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS)
for allowed_command in "${allowed_commands_array[@]}"; do
if [ "${allowed_command}" == "${commandname}" ]; then
install_gamedig.sh
fi
done

5
lgsm/modules/core_modules.sh

@ -714,6 +714,11 @@ install_factorio_save.sh() {
fn_fetch_module
}
install_gamedig.sh() {
modulefile="${FUNCNAME[0]}"
fn_fetch_module
}
install_dst_token.sh() {
modulefile="${FUNCNAME[0]}"
fn_fetch_module

11
lgsm/modules/install_gamedig.sh

@ -0,0 +1,11 @@
#!/bin/bash
# LinuxGSM install_gamedig.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Installs nodejs and gamedig
if [ "$(command -v node)" ] || [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then
cd "${lgsmdir}" || exit
npm install [email protected]
fi
Loading…
Cancel
Save