From c4ca2479de5042ce49dcf947e1799c551bf32a53 Mon Sep 17 00:00:00 2001 From: Jaime Moreira Date: Sun, 19 Nov 2023 23:32:56 -0300 Subject: [PATCH] Only one place to obtain Duke3D shareware --- scriptmodules/ports/eduke32.sh | 22 +++++++++++----------- scriptmodules/ports/jfduke3d.sh | 15 +-------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/scriptmodules/ports/eduke32.sh b/scriptmodules/ports/eduke32.sh index 3a727fa2b7..abc89db120 100644 --- a/scriptmodules/ports/eduke32.sh +++ b/scriptmodules/ports/eduke32.sh @@ -76,16 +76,14 @@ function install_eduke32() { function game_data_eduke32() { local dest="$romdir/ports/duke3d" - if [[ "$md_id" == "eduke32" ]]; then - if [[ ! -n $(find $dest -maxdepth 1 -iname duke3d.grp) ]]; then - mkUserDir "$dest" - local temp="$(mktemp -d)" - download "$__archive_url/3dduke13.zip" "$temp" - unzip -L -o "$temp/3dduke13.zip" -d "$temp" dn3dsw13.shr - unzip -L -o "$temp/dn3dsw13.shr" -d "$dest" duke3d.grp duke.rts - rm -rf "$temp" - chown -R $user:$user "$dest" - fi + if [[ ! -n $(find $dest -maxdepth 1 -iname duke3d.grp) ]]; then + mkUserDir "$dest" + local temp="$(mktemp -d)" + download "$__archive_url/3dduke13.zip" "$temp" + unzip -L -o "$temp/3dduke13.zip" -d "$temp" dn3dsw13.shr + unzip -L -o "$temp/dn3dsw13.shr" -d "$dest" duke3d.grp duke.rts + rm -rf "$temp" + chown -R $user:$user "$dest" fi } @@ -107,7 +105,9 @@ function configure_eduke32() { rm -f "$romdir/ports/Duke3D Shareware.sh" if [[ "$md_mode" == "install" ]]; then - game_data_eduke32 + if [[ "$md_id" == "eduke32" ]]; then + game_data_eduke32 + fi touch "$config" iniConfig " " '"' "$config" diff --git a/scriptmodules/ports/jfduke3d.sh b/scriptmodules/ports/jfduke3d.sh index 3b1df5d7f0..b19eaba176 100644 --- a/scriptmodules/ports/jfduke3d.sh +++ b/scriptmodules/ports/jfduke3d.sh @@ -75,19 +75,6 @@ function install_jfduke3d() { fi } -function game_data_jfduke3d() { - local dest="$romdir/ports/duke3d" - if [[ ! -n $(find $dest -maxdepth 1 -iname duke3d.grp) ]]; then - mkUserDir "$dest" - local temp="$(mktemp -d)" - download "$__archive_url/3dduke13.zip" "$temp" - unzip -L -o "$temp/3dduke13.zip" -d "$temp" dn3dsw13.shr - unzip -L -o "$temp/dn3dsw13.shr" -d "$dest" duke3d.grp duke.rts - rm -rf "$temp" - chown -R $user:$user "$dest" - fi -} - function config_file_jfduke3d() { local config="$1" if [[ -f "$config" ]] || isPlatform "x86"; then @@ -113,6 +100,6 @@ function configure_jfduke3d() { if [[ "$md_mode" != "install" ]]; then return fi - game_data_jfduke3d + game_data_eduke32 config_file_jfduke3d "$md_conf_root/jfduke3d/duke3d.cfg" }