Add AOE modpack 1.0.4 for minecraft 1.10.2
This commit is contained in:
23
dl_mods.sh
Executable file
23
dl_mods.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
function getJsonVal() {
|
||||
python -c "import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))";
|
||||
}
|
||||
|
||||
IFS=';'
|
||||
|
||||
files=$(cat /build/aoe/manifest.json | getJsonVal "['files']")
|
||||
files=${files//'}, {'/';'}
|
||||
files=${files//'[{'/''}
|
||||
files=${files//'}]'/''}
|
||||
|
||||
for addr in $files
|
||||
do
|
||||
echo $addr
|
||||
p=$(echo '{'$addr'}' | getJsonVal "['projectID']")
|
||||
f=$(echo '{'$addr'}' | getJsonVal "['fileID']")
|
||||
|
||||
if [ -n "$p" ]; then
|
||||
wget https://minecraft.curseforge.com/projects/$p/files/$f/download -O /minecraft/mods/${p}_${f}.jar
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user