Skip to content

Commit

Permalink
Only one place to obtain Duke3D shareware
Browse files Browse the repository at this point in the history
  • Loading branch information
protocultor committed Nov 20, 2023
1 parent 07041be commit 2bc01b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
20 changes: 9 additions & 11 deletions scriptmodules/ports/eduke32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -107,7 +105,7 @@ function configure_eduke32() {
rm -f "$romdir/ports/Duke3D Shareware.sh"

if [[ "$md_mode" == "install" ]]; then
game_data_eduke32
[[ "$md_id" == "eduke32" ]] && game_data_eduke32

touch "$config"
iniConfig " " '"' "$config"
Expand Down
15 changes: 1 addition & 14 deletions scriptmodules/ports/jfduke3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
}

0 comments on commit 2bc01b1

Please sign in to comment.