From 2622c7adf90bad2b2fbf307bbccd48abdb4e2bb1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Jul 2016 07:15:06 +0100 Subject: [PATCH] added function update function --- lgsm/functions/core_dl.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 832ae7fbf..46b5e289d 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -202,4 +202,18 @@ fn_fetch_function(){ force="noforce" md5="nomd5" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" +} + +fn_update_function(){ + github_file_url_dir="lgsm/functions" # github dir containing the file + github_file_url_name="${functionfile}" # name of the github file + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fileurl="${githuburl}" + filedir="${functionsdir}" + filename="${github_file_url_name}" + executecmd="noexecute" + run="run" + force="noforce" + md5="nomd5" + fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" } \ No newline at end of file