From 39f486af302634da9232d6ace9653213162c6599 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Thu, 19 May 2022 20:10:02 +0000 Subject: [PATCH] Update SigScript Co-authored-by: sigonasr2 --- scripts/commit.sh | 9 ++++++++- scripts/lean.sh | 1 + scripts/md5 | 9 +++++---- utils/.coauthors | 1 + utils/md5 | 9 +++++---- utils/search.sh | 13 ++++++++++--- 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 scripts/lean.sh create mode 100644 utils/.coauthors diff --git a/scripts/commit.sh b/scripts/commit.sh index ac215af..6c49768 100755 --- a/scripts/commit.sh +++ b/scripts/commit.sh @@ -1,6 +1,13 @@ #Adds a commit message and pushes project to github repository. #Java +COMMIT_MESSAGE="$*" +while IFS= read -r line +do + COMMIT_MESSAGE+=" + +Co-authored-by: $line" +done < utils/.coauthors git add -u git add * -git commit -m "$*" +git commit -m "$COMMIT_MESSAGE" git push \ No newline at end of file diff --git a/scripts/lean.sh b/scripts/lean.sh new file mode 100644 index 0000000..1becba2 --- /dev/null +++ b/scripts/lean.sh @@ -0,0 +1 @@ +404: Not Found \ No newline at end of file diff --git a/scripts/md5 b/scripts/md5 index c2f992b..c4273a3 100644 --- a/scripts/md5 +++ b/scripts/md5 @@ -1,4 +1,5 @@ -a833e7598ad65672a9c01306d244b49f - -96ce35f2d2dcb555421e00a6afda23ca - -fe50a24283991ac63984a3afcac1ac41 - -2ac636f584c43a1124affb9ea6bdc7bf - +build.sh:a833e7598ad65672a9c01306d244b49f - +clean.sh:96ce35f2d2dcb555421e00a6afda23ca - +commit.sh:21af1fa6f09d01679c9e11408967264a - +jar.sh:2ac636f584c43a1124affb9ea6bdc7bf - +lean.sh:3be7b8b182ccd96e48989b4e57311193 - diff --git a/utils/.coauthors b/utils/.coauthors new file mode 100644 index 0000000..b904d0f --- /dev/null +++ b/utils/.coauthors @@ -0,0 +1 @@ +sigonasr2 diff --git a/utils/md5 b/utils/md5 index 1a18d14..ebfc281 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,4 +1,5 @@ -d6b20a25a04a60d94f466e48fa60ac69 - -32a1f953ffca8584d1eb57c0ecd8a582 - -13e14229619562047b230081a9e0b4ce - -0ede00461e947494545e694040787b3f - +.coauthors:3785ad38663e5fc43e574914ad067294 - +define.sh:d6b20a25a04a60d94f466e48fa60ac69 - +main.sh:32a1f953ffca8584d1eb57c0ecd8a582 - +search.sh:bcf5ac8c2011672a60341ecd676accff - +.updateDirectories:0ede00461e947494545e694040787b3f - diff --git a/utils/search.sh b/utils/search.sh index 3b26b29..7bf8004 100644 --- a/utils/search.sh +++ b/utils/search.sh @@ -9,7 +9,8 @@ function search() { else echo "$1$g is a file" if [ $g != "md5" ]; then - md5sum < $1$g >> $1md5 + SUM=$(md5sum < $1$g) + echo "$g:$SUM" >> $1md5 else echo " md5 file, ignoring..." fi @@ -28,8 +29,11 @@ function check() { if [ "$DIFF" != "" ] then echo " Differences detected!" - for g in $FILES2 + + while IFS= read -r line do + IFS=':' read -ra split <<< $line + g="${split[0]}" if [ "$g" != "md5" ]; then if [ -f $1$g ]; then @@ -54,9 +58,12 @@ function check() { 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 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 + done < /tmp/out fi fi for g in $FILES2