mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-24 23:38:28 +00:00
Move mod extraction to out of doInstallMod
This commit is contained in:
parent
2207ff160a
commit
4bd9da569a
@ -595,14 +595,14 @@ doDownloadMod(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Downloads mod and installs it into mods directory
|
# Extracts a mod into the ARK Mods directory
|
||||||
#
|
#
|
||||||
doInstallMod(){
|
doExtractMod(){
|
||||||
local modid=$1
|
local modid=$1
|
||||||
local modsrcdir="$steamcmdroot/steamapps/workshop/content/$mod_appid/$modid"
|
local modsrcdir="$steamcmdroot/steamapps/workshop/content/$mod_appid/$modid"
|
||||||
local moddestdir="$arkserverroot/ShooterGame/Content/Mods/$modid"
|
local moddestdir="$arkserverroot/ShooterGame/Content/Mods/$modid"
|
||||||
|
|
||||||
if doDownloadMod $modid; then
|
if [ -f "$modsrcdir/mod.info" ]; then
|
||||||
echo "Copying files to $moddestdir"
|
echo "Copying files to $moddestdir"
|
||||||
if [ -f "$modsrcdir/LinuxNoEditor/mod.info" ]; then
|
if [ -f "$modsrcdir/LinuxNoEditor/mod.info" ]; then
|
||||||
modsrcdir="$modsrcdir/LinuxNoEditor"
|
modsrcdir="$modsrcdir/LinuxNoEditor"
|
||||||
@ -667,7 +667,17 @@ doInstallMod(){
|
|||||||
else
|
else
|
||||||
echo -ne '\x01\x00\x00\x00\x08\x00\x00\x00ModType\x00\x02\x00\x00\x001\x00' >>"$moddestdir/.mod"
|
echo -ne '\x01\x00\x00\x00\x08\x00\x00\x00ModType\x00\x02\x00\x00\x001\x00' >>"$moddestdir/.mod"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Downloads mod and installs it into mods directory
|
||||||
|
#
|
||||||
|
doInstallMod(){
|
||||||
|
local modid=$1
|
||||||
|
|
||||||
|
if doDownloadMod $modid; then
|
||||||
|
doExtractMod $modid
|
||||||
echo "Mod $modid installed"
|
echo "Mod $modid installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user