Browse Source

codacy: Declare and assign separately to avoid masking return values.

pull/2251/head
Daniel Gibbs 6 years ago
parent
commit
4e81d81c31
  1. 6
      lgsm/functions/update_mta.sh

6
lgsm/functions/update_mta.sh

@ -105,9 +105,9 @@ fn_update_mta_localbuild(){
fn_update_mta_remotebuild(){
# Gets remote build info.
local majorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')"
local minorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')"
local maintenanceversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')"
majorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAJOR" | awk '{ print $3 }' | sed 's/\r//g')"
minorversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MINOR" | awk '{ print $3 }' | sed 's/\r//g')"
maintenanceversion="$(curl -s https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h | grep "#define MTASA_VERSION_MAINTENANCE" | awk '{ print $3 }' | sed 's/\r//g')"
remotebuild="${majorversion}.${minorversion}.${maintenanceversion}"
if [ "${installer}" != "1" ]; then
fn_print_dots "Checking for update: ${remotelocation}: checking remote build"

Loading…
Cancel
Save