From cfcf83436295aeafb1fa1bdff2643445f126c621 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 17 May 2022 19:21:00 +0000 Subject: [PATCH] Include the possibility of only the scripts folder being copied --- utils/md5 | 2 +- utils/search.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/md5 b/utils/md5 index 768f3fb..08004ff 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,3 +1,3 @@ 5e7a21b710475f173906085c01bd2205 - 548480c89fb8d6668a83ee9e534eb2dd - -876c9372db6d232cae42b516b2b2596f - +03061acd7af07b0d1295509234ff99b7 - diff --git a/utils/search.sh b/utils/search.sh index a477997..668df87 100644 --- a/utils/search.sh +++ b/utils/search.sh @@ -42,7 +42,13 @@ function check() { if [ "$REDOWNLOAD" = "true" ]; then echo "++Redownload $1$g..." if [ -f "$1$g" ]; then - curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g + #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 + else + curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g + fi else echo "===Could not find directory, assuming regular scripts directory exists." curl https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output scripts/$g