update plugin fetcher & extras
This commit is contained in:
parent
bbf0c6fa76
commit
9d0263a079
2 changed files with 5 additions and 7 deletions
Binary file not shown.
|
@ -9,13 +9,11 @@ compile_gradle () { # fetch_git_repo_and_compile_gradle sounded too long
|
|||
rm -rf mod_files/
|
||||
}
|
||||
|
||||
fetch_github_releases () {
|
||||
tag="$(curl "https://github.com/$1/releases?q=$2&expanded=true" | grep -oE '"/'$1'/releases/tag/[^"]+"' | cut -f 6 -d '/' | tr -d '"')"
|
||||
jars="$(curl -L -H 'Accept: application/vnd.github+json' https://api.github.com/repos/$1/releases/tags/$tag | grep -oE '"https://github.com/'$1'/[^"]+\.jar"' | tr -d '"')"
|
||||
curl -OJL "$(echo $jars | awk '{print length($0)"\t"$0}' | sort -n | cut -f2- | head -n 1)"
|
||||
}
|
||||
|
||||
mkdir fetched_mods
|
||||
cd fetched_mods
|
||||
|
||||
fetch_github_releases 'FabricMC/fabric' '20w14infinite'
|
||||
# Fetch mods
|
||||
compile_gradle 'https://code.chipmunk.land/infiniteserver/extras.git'
|
||||
|
||||
# Normalize filenames
|
||||
mv extras-*.jar extras.jar
|
||||
|
|
Loading…
Reference in a new issue