Browse Source

More hash updates

pull/525/head
Jared Ballou 9 years ago
parent
commit
a42a04c779
  1. 5
      Insurgency/insserver
  2. 7
      functions/github_hash.sh

5
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}"

7
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

Loading…
Cancel
Save