From 305a07bc098a0fa75e2a90c5838b9df58a00a823 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 17 May 2022 17:41:26 +0000 Subject: [PATCH] include main directory --- scripts/commit.sh | 5 +++++ scripts/md5 | 2 +- utils/md5 | 2 +- utils/search.sh | 8 +++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/commit.sh b/scripts/commit.sh index dfec664..c7e0a3e 100755 --- a/scripts/commit.sh +++ b/scripts/commit.sh @@ -11,6 +11,11 @@ for f in $FILES do search $f done +FILES=$(ls -p | grep -v /) +for f in $FILES +do + md5sum < $1$g >> $1md5 +done git add -u git add * git commit -m "$*" diff --git a/scripts/md5 b/scripts/md5 index 42c4a60..7c6f940 100644 --- a/scripts/md5 +++ b/scripts/md5 @@ -1 +1 @@ -1aaed43b1f90e8ca1926f79f20d836e9 - +1094c3bd2fba49cf27e26c10b63451cc - diff --git a/utils/md5 b/utils/md5 index a6e2766..8f44108 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,3 +1,3 @@ a137a2465efff1c5c1ac2e59ccddb20b - 548480c89fb8d6668a83ee9e534eb2dd - -3d3c053e6902e501283ca7e1d2b99ea1 - +e2414fa0ac4594be9c2002aa6e98ebb6 - diff --git a/utils/search.sh b/utils/search.sh index 522c4bf..7130c91 100644 --- a/utils/search.sh +++ b/utils/search.sh @@ -16,9 +16,11 @@ function search() { function check() { echo "Check $1" FILES2=$(ls $1) + MD5_EXISTS=false if [ -f "$1/md5" ]; then - echo " md5 exists" + MD5_EXISTS=true + echo " md5: $MD5_EXISTS" fi for g in $FILES2 do @@ -26,6 +28,10 @@ function check() { then echo "$1$g is a directory" check $1$g/ + else + if [ "$MD5_EXISTS" = true ]; then + md5hash < curl -s https://raw.githubusercontent.com/sigonasr2/SigScript/main/sig + fi fi done } \ No newline at end of file