From 1a9c05a1901437637abcb60146bb0ab8883053cc Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Thu, 20 Jun 2024 09:45:44 -0700 Subject: [PATCH] Oops, didn't mean to commit these two changes. Reverting. --- files/bin/dz-common | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/bin/dz-common b/files/bin/dz-common index 1ee2083..ba08f99 100755 --- a/files/bin/dz-common +++ b/files/bin/dz-common @@ -113,14 +113,16 @@ get_mod_id(){ fi # If we have a second argument, we want to iterate over active server mods DIR=${SERVER_FILES} + ARG="-d" if [[ ${2} = "0" ]] then + ARG="-tdr" DIR=${SERVER_PROFILE} fi # echo "DIR: ${DIR}, ARG: ${ARG}" >&2 X=1 # Loop over mods - for link in "${DIR}"/@* + for link in $(ls ${ARG} ${DIR}/@* 2> /dev/null) do ID=$(readlink ${link} | awk -F/ '{print $NF}') if [[ "${X}" = "${1}" ]] @@ -145,7 +147,7 @@ get_mods(){ get_mod_command_line(){ mod_command_line="" - for link in "${SERVER_PROFILE}"/@* + for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null) do ID=$(readlink ${link} | awk -F/ '{print $NF}') MODNAME=$(get_mod_name ${ID})