Check for differences if the target directory changes

main
sigonasr2, Sig, Sigo 3 years ago
parent 1a36ea04bf
commit d0f888406c
  1. 2
      utils/md5
  2. 10
      utils/search.sh

@ -1,3 +1,3 @@
d682bd9df64981bdd93ed1413e96802c -
548480c89fb8d6668a83ee9e534eb2dd -
fd74adfda9b84c0c6348060b73a0ec67 -
2b4cc4fb64d8f08c043cafba41d29473 -

@ -38,7 +38,15 @@ function check() {
#Read the 2nd line and see if it has a special directory.
CHECKLINE=$(sed -n '2{p;q;}' $1$g)
if [ "${CHECKLINE:0:1}" = "#" ]; then
curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1$g --output $1$g
#This could be a different diff, try that one.
echo " md5: https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1md5"
curl -s https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1md5 --output /tmp/out
DIFF=$(diff $1/md5 /tmp/out)
if [ "$DIFF" != "" ]
then
echo " Differences detected here too."
curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1$g --output $1$g
fi
else
curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g
fi

Loading…
Cancel
Save