From 9c12b224c91d895977ba93d45a6147fa39f13274 Mon Sep 17 00:00:00 2001 From: leca Date: Sun, 22 Sep 2024 03:25:18 +0300 Subject: [PATCH] TODO --- install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install.sh b/install.sh index a4b3df6..3daa7d4 100755 --- a/install.sh +++ b/install.sh @@ -8,8 +8,11 @@ download_and_install_game() { cd games wget -O game.zip "${download_url}" unzip game.zip + cd ../ # data } +get_dependencies + mkdir -p data/games 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}/) 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 \ No newline at end of file