Browse Source

New download manager

core_dl will handle all downloads for LGSM allowing a consistent
download experience
pull/743/head
Daniel Gibbs 9 years ago
parent
commit
60a70250d6
  1. 29
      functions/core_dl.sh
  2. 8
      functions/core_functions.sh

29
functions/core_dl.sh

@ -0,0 +1,29 @@
#!/bin/bash
# LGSM core_dl.sh function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
lgsm_version="050216"
# Description: Deals with all downloads for LGSM.
fn_curl_dl(){
curl_filename=$1
curl_filepath=$2
curl_url=$3
echo "curl_filename $curl_filename"
echo "curl_url ${curl_url}"
echo "curl_filepath ${curl_filepath}"
echo -ne "Downloading ${mm_file_latest}...\c"
curl_dl=$(curl --fail -o "${curl_filepath}" "${curl_url}" )
exitcode=$?
if [ $? -ne 0 ]; then
fn_printfaileol
echo "${curl_dl}"
echo -e "${url}\n"
exit ${exitcode}
else
fn_printokeol
fi
}

8
functions/core_functions.sh

@ -32,6 +32,11 @@ functionfile="${FUNCNAME}"
fn_runfunction
}
core_dl.sh(){
functionfile="${FUNCNAME}"
fn_runfunction
}
# Command
@ -400,3 +405,6 @@ fn_runfunction
# Calls on-screen messages
core_messages.sh
#Calls file downloader
core_dl.sh

Loading…
Cancel
Save