use a filelist system for updates, remove configurable files from md5

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
Nic0Nic0Nii 3 years ago
parent e621331816
commit 1e9b5ce216
  1. 5
      Java/scripts/filelist
  2. 1
      Java/scripts/md5
  3. 1
      scripts/filelist
  4. 5
      utils/filelist
  5. 3
      utils/md5
  6. 43
      utils/search.sh

@ -0,0 +1,5 @@
build.sh
clean.sh
commit.sh
jar.sh
version_info

@ -2,4 +2,3 @@ build.sh:55f0208b07ba384f45009d6f92fe88fe -
clean.sh:96ce35f2d2dcb555421e00a6afda23ca -
commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 -
jar.sh:56f9b7c6dc8e85f28ffefe9ce82b1f07 -
version_info:e9b45e6c78d5fd34c3e1d398b5775a67 -

@ -0,0 +1 @@
commit.sh

@ -0,0 +1,5 @@
.coauthors
define.sh
main.sh
search.sh
.updateDirectories

@ -1,5 +1,4 @@
.coauthors:3785ad38663e5fc43e574914ad067294 -
define.sh:74ea08fb12cab1053663f87007ddd29a -
main.sh:909d8d53e71c87a4b5f0f5da9fa6baa2 -
search.sh:16d0a1eebbe03202019c7575d27ec3e1 -
search.sh:2a471ffc3daa12f96157e613873f589d -
.updateDirectories:0ede00461e947494545e694040787b3f -

@ -8,11 +8,14 @@ function search() {
search $1$g/
else
echo "$1$g is a file"
if [ $g != "md5" ]; then
if [ $g != "md5" ] && [ $g != "filelist" ]; then
if [ $g != ".coauthors" ] && [ $g != "version_info" ]; then
SUM=$(md5sum < $1$g)
echo "$g:$SUM" >> $1md5
fi
echo "$g" >> $1filelist
else
echo " md5 file, ignoring..."
echo " ignoring $g..."
fi
fi
done
@ -35,7 +38,41 @@ function check() {
IFS=':' read -ra split <<< $line
g="${split[0]}"
echo "LINE -- $g"
if [ "$g" != "md5" ]; then
if [ "$g" != "md5" ] && [ "$g" != "filelist" ]; then
if [ -f $1$g ];
then
if [ "$g" != ".coauthors" ] && [ "$g" != "version_info" ]; then
echo "++Redownload $1$g..."
if [ -f "$1$g" ]; then
curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $1$g
else
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 $LANGUAGE/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 $1$g
fi
fi
done < /tmp/out
fi
fi
if [ -f "$1/filelist" ];
then
echo " filelist: https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1filelist"
curl -H 'Cache-Control: no-cache, no-store' -s "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1filelist" --output /tmp/out
cmp -s $1/filelist /tmp/out
if [ "$?" -ne 0 ]
then
echo " Differences detected!"
cat /tmp/out
while IFS= read -r line
do
IFS=':' read -ra split <<< $line
g="${split[0]}"
echo "LINE -- $g"
if [ "$g" != "md5" ] && [ "$g" != "filelist" ]; then
if [ -f $1$g ];
then
if [ "$g" != ".coauthors" ] && [ "$g" != "version_info" ]; then

Loading…
Cancel
Save