TODO
This commit is contained in:
parent
cc20da589e
commit
9c12b224c9
22
install.sh
22
install.sh
|
@ -8,8 +8,11 @@ download_and_install_game() {
|
||||||
cd games
|
cd games
|
||||||
wget -O game.zip "${download_url}"
|
wget -O game.zip "${download_url}"
|
||||||
unzip game.zip
|
unzip game.zip
|
||||||
|
cd ../ # data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_dependencies
|
||||||
|
|
||||||
mkdir -p data/games
|
mkdir -p data/games
|
||||||
cd data
|
cd data
|
||||||
|
|
||||||
|
@ -62,3 +65,22 @@ request_url="${API_URL}/packages/${chosen_author}/${chosen_packet_name}"
|
||||||
chosen=$(curl --silent -X GET $API_URL/packages/${chosen_author}/${chosen_packet_name}/)
|
chosen=$(curl --silent -X GET $API_URL/packages/${chosen_author}/${chosen_packet_name}/)
|
||||||
|
|
||||||
download_and_install_game "${chosen}"
|
download_and_install_game "${chosen}"
|
||||||
|
|
||||||
|
#Downloading mods
|
||||||
|
#Array to store aaaaaall the mods to be installed, including their dependencies, dependencies of their dependencies, etc...
|
||||||
|
mods_to_install=("")
|
||||||
|
|
||||||
|
oIFS="$IFS"
|
||||||
|
IFS=";"
|
||||||
|
mods_to_install=($SERVER_MODS)
|
||||||
|
IFS="$oIFS"
|
||||||
|
|
||||||
|
#TODO:
|
||||||
|
#1. Iterate over all mods in an array
|
||||||
|
#2. For every mod, check all deps. (including required and optional)
|
||||||
|
#3. Ask for required deps, i.e.
|
||||||
|
# 3.1 Check for satisfied deps and dont touch them (user has specified them in .env, SERVER_MODS)
|
||||||
|
# 3.2 Check for unsatisfiend deps and give user a list of possible candidates for that dep.
|
||||||
|
# 3.2.1 go to step 3, treating a dependency as a mod.
|
||||||
|
# 3.3 Check for optional deps, as user if they want to install these, "-1" or "no(t)" if they dont want to and number of package to install
|
||||||
|
#4. Download all mods for array formed during these steps
|
Loading…
Reference in New Issue