Avoid useless warnings during install

This commit is contained in:
Ben Peddell 2017-01-09 00:29:15 +10:00
parent fc39858dc8
commit 84a0768b6b

View File

@ -289,27 +289,31 @@ checkConfig() {
fi
# Environment configuration
# arkserverexec
if [ -n "$arkserverroot" ] && [ ! -f "$arkserverroot/$arkserverexec" ] ; then
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
fi
# SavedArks directory
if [ -n "$arkserverroot" ]; then
local savedarksdir="${arkserverroot}/ShooterGame/Saved/${ark_AltSaveDirectoryName:-SavedArks}"
mkdir -p "${savedarksdir}"
if [ ! -w "${savedarksdir}" ]; then
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tThe ARK SavedArks directory is not writable, and saveworld will fail"
if [ "$1" != "install" ]; then
# arkserverexec
if [ -n "$arkserverroot" ] && [ ! -f "$arkserverroot/$arkserverexec" ] ; then
echo -e "[" "$YELLOW" "WARN" "$NORMAL" "]" "\tYour ARK server exec could not be found."
fi
fi
# Warn if any mods are requested but not installed
if [ -n "$arkserverroot" -a -d "${arkserverroot}/ShooterGame/Content/Mods" ]; then
for modid in $(getModIds); do
if [ ! -f "${arkserverroot}/ShooterGame/Content/Mods/${modid}/mod.info" ]; then
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tMod ${modid} is requested but not installed. Run 'arkmanager installmod ${modid}' to install this mod."
# SavedArks directory
if [ -n "$arkserverroot" ]; then
local savedarksdir="${arkserverroot}/ShooterGame/Saved/${ark_AltSaveDirectoryName:-SavedArks}"
mkdir -p "${savedarksdir}"
if [ ! -w "${savedarksdir}" ]; then
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tThe ARK SavedArks directory is not writable, and saveworld will fail"
fi
done
fi
if [ "$1" != "installmod" ] && [ "$1" != "installmods" ]; then
# Warn if any mods are requested but not installed
if [ -n "$arkserverroot" -a -d "${arkserverroot}/ShooterGame/Content/Mods" ]; then
for modid in $(getModIds); do
if [ ! -f "${arkserverroot}/ShooterGame/Content/Mods/${modid}/mod.info" ]; then
echo -e "[" "$RED" "ERROR" "$NORMAL" "]" "\tMod ${modid} is requested but not installed. Run 'arkmanager installmod ${modid}' to install this mod."
fi
done
fi
fi
fi
# Warn if mod_branch=Linux
@ -2897,7 +2901,7 @@ main(){
(
echo "Running command '${command}' for instance '${instance}'"
useConfig "$instance"
checkConfig
checkConfig "$command"
case "$command" in
run)