meta: superficial tweak to auto-update

This commit is contained in:
Connor Olding 2022-10-05 08:19:05 -07:00
parent c90835a51b
commit b4c10b6a69

View File

@ -24,9 +24,9 @@ latest() { : \
&& while [ $# != 0 ] \
;do dir="$1" tag="$2" url="$3" \
&& { shift && shift && shift || { note 'incomplete triplet'; exit 70 ;} ;} \
&& if ! [ -d "$dir" ] && ! [ -f "$dir/$df" ] && ! [ -s "$dir/$df" ] \
;then note "missing $df, skipping $dir ($tag)"; continue \
;fi \
&& { [ -d "$dir" ] && [ -f "$dir/$df" ] && [ -s "$dir/$df" ] \
|| { note "missing $df, skipping $dir ($tag)"; continue ;} \
;} \
&& ours="$(grep -F "$tag"= "$dir/$df" | grep -Eo '[0-9a-f]{40}')" \
&& theirs="$(latest "$url")" ours="${ours%%$n*}" theirs="${theirs%%$n*}" \
&& if [ ${#ours} = 0 ] || [ ${#theirs} = 0 ] \