diff --git a/Insurgency/insserver b/Insurgency/insserver index 757456721..f3b20839b 100755 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -113,11 +113,12 @@ fn_getgithubfile(){ filename=$1 exec=$2 fileurl=${3:-$filename} + force=$4 filepath="${lgsmdir}/${filename}" filedir=$(dirname "${filepath}") # If the function file is missing, then download - if [ ! -f "${filepath}" ]; then + if [ ! -f "${filepath}" ] || [ "${force}" != "" ]; then if [ ! -d "${filedir}" ]; then mkdir -p "${filedir}" fi @@ -133,8 +134,6 @@ fn_getgithubfile(){ chmod +x "${filepath}" fi fn_colortext 32 "DONE" - else - fn_check_github_files "${lgsmdir}" "${lgsmdir}/${filename}" fi if [ "${exec}" ]; then source "${filepath}" diff --git a/functions/github_hash.sh b/functions/github_hash.sh index eb707fffc..2362e0f1e 100755 --- a/functions/github_hash.sh +++ b/functions/github_hash.sh @@ -64,7 +64,7 @@ fn_check_github_files(){ # Check all files in functions for updates for file in $files; do if [ -d $file ]; then - echo "Descending into ${file}..." + #echo "Descending into ${file}..." fn_check_github_files "${prefix}" ${file}/* else myhash=$(fn_get_git_hash $file) @@ -73,9 +73,10 @@ fn_check_github_files(){ if [ "${githash}" == "" ]; then echo "Can't find ${repofile} in git!" elif [ "${myhash}" != "${githash}" ]; then - echo "Would fetch ${repofile}: have ${myhash}, expected ${githash}" + #echo "Would fetch ${repofile}: have ${myhash}, expected ${githash}" + fn_getgithubfile "${file}" 0 "${repofile}" 1 else - echo "${repofile} is OK" + #echo "${repofile} is OK" fi fi done