Read from md5 file to download new files

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
Nic0Nic0Nii 3 years ago
parent 8e790bd692
commit 40d20ff58b
  1. 2
      utils/md5
  2. 10
      utils/search.sh

@ -1,5 +1,5 @@
.coauthors:3785ad38663e5fc43e574914ad067294 - .coauthors:3785ad38663e5fc43e574914ad067294 -
define.sh:d6b20a25a04a60d94f466e48fa60ac69 - define.sh:d6b20a25a04a60d94f466e48fa60ac69 -
main.sh:32a1f953ffca8584d1eb57c0ecd8a582 - main.sh:32a1f953ffca8584d1eb57c0ecd8a582 -
search.sh:96e1cfe7bfb635d9773265f416378f15 - search.sh:a1bad2e2e06621e7a84712a0b360b45c -
.updateDirectories:0ede00461e947494545e694040787b3f - .updateDirectories:0ede00461e947494545e694040787b3f -

@ -29,8 +29,11 @@ function check() {
if [ "$DIFF" != "" ] if [ "$DIFF" != "" ]
then then
echo " Differences detected!" echo " Differences detected!"
for g in $FILES2
while IFS= read -r line
do do
IFS=':' read -ra split <<< $line
g="${split[0]}"
if [ "$g" != "md5" ]; then if [ "$g" != "md5" ]; then
if [ -f $1$g ]; if [ -f $1$g ];
then then
@ -55,9 +58,12 @@ function check() {
echo "===Could not find directory, assuming regular scripts directory exists." echo "===Could not find directory, assuming regular scripts directory exists."
curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output scripts/$g curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output scripts/$g
fi fi
else
echo "++==Downloading $1$g..."
curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output scripts/$g
fi fi
fi fi
done done < utils/.coauthors
fi fi
fi fi
for g in $FILES2 for g in $FILES2

Loading…
Cancel
Save