Update SigScript system
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
This commit is contained in:
parent
871db21d15
commit
81664c1c7d
31
Java/scripts/commit.sh
Executable file
31
Java/scripts/commit.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#Adds a commit message and pushes project to github repository.
|
||||||
|
#
|
||||||
|
|
||||||
|
source utils/search.sh
|
||||||
|
|
||||||
|
find . -type f -name md5 -delete
|
||||||
|
|
||||||
|
#Generate a new hash for every sub-directory, which may require an update.
|
||||||
|
FILES=$(cat utils/.updateDirectories)
|
||||||
|
COMMIT_MESSAGE="$*"
|
||||||
|
FIRST_LINE=true
|
||||||
|
while IFS= read -r line
|
||||||
|
do
|
||||||
|
if [ "$FIRST_LINE" = true ]; then
|
||||||
|
COMMIT_MESSAGE+="
|
||||||
|
|
||||||
|
Co-authored-by: $line"
|
||||||
|
FIRST_LINE=false
|
||||||
|
else
|
||||||
|
COMMIT_MESSAGE+="
|
||||||
|
Co-authored-by: $line"
|
||||||
|
fi
|
||||||
|
done < utils/.coauthors
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
search $f
|
||||||
|
done
|
||||||
|
git add -u
|
||||||
|
git add *
|
||||||
|
git commit -m "$COMMIT_MESSAGE"
|
||||||
|
git push
|
||||||
@ -11,6 +11,5 @@ cd ${OUT_DIR}
|
|||||||
jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig
|
jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig
|
||||||
printf "\n\n\nRunning Program...\n\n"
|
printf "\n\n\nRunning Program...\n\n"
|
||||||
java -jar ${PROJECT_NAME}.jar "$@"
|
java -jar ${PROJECT_NAME}.jar "$@"
|
||||||
mv ${PROJECT_NAME}.jar ${ORIGINAL_LOC}
|
|
||||||
cd ..
|
cd ..
|
||||||
./scripts/clean.sh
|
./${LANGUAGE}/scripts/clean.sh
|
||||||
4
Java/scripts/md5
Normal file
4
Java/scripts/md5
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
build.sh:a833e7598ad65672a9c01306d244b49f -
|
||||||
|
clean.sh:96ce35f2d2dcb555421e00a6afda23ca -
|
||||||
|
commit.sh:9c342703d765cad7ea296f16d68f29f4 -
|
||||||
|
jar.sh:cce5e429168700490f9c413b665d13d6 -
|
||||||
@ -1,13 +0,0 @@
|
|||||||
#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 "$COMMIT_MESSAGE"
|
|
||||||
git push
|
|
||||||
@ -1 +0,0 @@
|
|||||||
404: Not Found
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
build.sh:a833e7598ad65672a9c01306d244b49f -
|
|
||||||
clean.sh:96ce35f2d2dcb555421e00a6afda23ca -
|
|
||||||
commit.sh:21af1fa6f09d01679c9e11408967264a -
|
|
||||||
jar.sh:62ce62bbb97d3f3856bcc9b0ad34083c -
|
|
||||||
lean.sh:3be7b8b182ccd96e48989b4e57311193 -
|
|
||||||
1
sig
1
sig
@ -4,5 +4,6 @@ define PROJECT_NAME "RabiClone"
|
|||||||
define PROJECT_DIR "src/sig"
|
define PROJECT_DIR "src/sig"
|
||||||
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
||||||
define OUT_DIR "bin"
|
define OUT_DIR "bin"
|
||||||
|
define LANGUAGE "Java"
|
||||||
|
|
||||||
source utils/main.sh
|
source utils/main.sh
|
||||||
@ -1,5 +1,7 @@
|
|||||||
export VARS=("")
|
export VARS=("")
|
||||||
|
|
||||||
|
export LANGUAGE=""
|
||||||
|
|
||||||
function define() {
|
function define() {
|
||||||
VARS+=("$1")
|
VARS+=("$1")
|
||||||
value="${*:2}"
|
value="${*:2}"
|
||||||
|
|||||||
@ -13,11 +13,11 @@ if [ -z "$1" ]
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo " Command List:"
|
echo " Command List:"
|
||||||
FILES=$(ls -1A ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /')
|
FILES=$(ls -1A ./$LANGUAGE/scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /')
|
||||||
for f in $FILES
|
for f in $FILES
|
||||||
do
|
do
|
||||||
if [ $f != "md5" ]; then
|
if [ $f != "md5" ]; then
|
||||||
DESC="$(head -n1 ./scripts/$f.sh)"
|
DESC="$(head -n1 ./$LANGUAGE/scripts/$f.sh)"
|
||||||
printf "\n\t%-15s%-65s" $f "${DESC:1}"
|
printf "\n\t%-15s%-65s" $f "${DESC:1}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -25,4 +25,4 @@ if [ -z "$1" ]
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./scripts/$1.sh "${*:2}"
|
./$LANGUAGE/scripts/$1.sh "${*:2}"
|
||||||
@ -1,5 +1,5 @@
|
|||||||
.coauthors:6a70afcd3d554ff73e01a93ce090c992 -
|
.coauthors:6a70afcd3d554ff73e01a93ce090c992 -
|
||||||
define.sh:d6b20a25a04a60d94f466e48fa60ac69 -
|
define.sh:74ea08fb12cab1053663f87007ddd29a -
|
||||||
main.sh:32a1f953ffca8584d1eb57c0ecd8a582 -
|
main.sh:eacf0984141d284db6681dee4dc39ffa -
|
||||||
search.sh:6eec52214a36f2114442c41ab9c04f72 -
|
search.sh:0e54450c506bedf1d73666156fa78e1a -
|
||||||
.updateDirectories:0ede00461e947494545e694040787b3f -
|
.updateDirectories:0ede00461e947494545e694040787b3f -
|
||||||
|
|||||||
@ -24,7 +24,7 @@ function check() {
|
|||||||
if [ -f "$1/md5" ];
|
if [ -f "$1/md5" ];
|
||||||
then
|
then
|
||||||
echo " md5: https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5"
|
echo " md5: https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5"
|
||||||
curl -H 'Cache-Control: no-cache, no-store' -s https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5 --output /tmp/out
|
curl -H 'Cache-Control: no-cache, no-store' -s "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5/?$(date +%s)" --output /tmp/out
|
||||||
cmp -s $1/md5 /tmp/out
|
cmp -s $1/md5 /tmp/out
|
||||||
if [ "$?" -ne 0 ]
|
if [ "$?" -ne 0 ]
|
||||||
then
|
then
|
||||||
@ -34,35 +34,22 @@ function check() {
|
|||||||
do
|
do
|
||||||
IFS=':' read -ra split <<< $line
|
IFS=':' read -ra split <<< $line
|
||||||
g="${split[0]}"
|
g="${split[0]}"
|
||||||
|
echo "LINE -- $g"
|
||||||
if [ "$g" != "md5" ]; then
|
if [ "$g" != "md5" ]; then
|
||||||
if [ -f $1$g ];
|
if [ -f $1$g ];
|
||||||
then
|
then
|
||||||
if [ "$g" != ".coauthors" ]; then
|
if [ "$g" != ".coauthors" ]; then
|
||||||
echo "++Redownload $1$g..."
|
echo "++Redownload $1$g..."
|
||||||
if [ -f "$1$g" ]; then
|
if [ -f "$1$g" ]; then
|
||||||
#Read the 2nd line and see if it has a special directory.
|
curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g/?$(date +%s)" --output $1$g
|
||||||
CHECKLINE=$(sed -n '2{p;q;}' $1$g)
|
|
||||||
if [ "${CHECKLINE:0:1}" = "#" ]; then
|
|
||||||
#This could be a different diff, try that one.
|
|
||||||
echo " md5: https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1md5"
|
|
||||||
curl -H 'Cache-Control: no-cache, no-store' -s https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1md5 --output /tmp/out
|
|
||||||
cmp -s $1/md5 /tmp/out
|
|
||||||
if [ "$?" -ne 0 ]
|
|
||||||
then
|
|
||||||
echo " Differences detected here too."
|
|
||||||
curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/${CHECKLINE:1}/$1$g --output $1$g
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g
|
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/?$(date +%s)" --output $LANGUAGE/scripts/$g
|
||||||
fi
|
fi
|
||||||
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 scripts/$g
|
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "++==Downloading $1$g..."
|
echo "++==Downloading $1$g..."
|
||||||
curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g
|
curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g/?$(date +%s)" --output $1$g
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < /tmp/out
|
done < /tmp/out
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user