This commit is contained in:
2023-11-20 21:08:31 -06:00
parent f190e47f69
commit f448fd12c6

View File

@@ -110,12 +110,7 @@ update_mods_for_server() {
echo echo
mods_file="$MODLISTS/$1" mods_file="$MODLISTS/$1"
echo $mods_file
echo
cat $mods_file
echo
map_name=${1%.txt} map_name=${1%.txt}
echo $map_name
mkdir -p "$REMOTE_MODS/$map_name" mkdir -p "$REMOTE_MODS/$map_name"
# Create temporary file to list all the mod_id's we are # Create temporary file to list all the mod_id's we are
@@ -123,8 +118,6 @@ update_mods_for_server() {
tempfile="/tmp/$map_name-mods_to_download.txt" tempfile="/tmp/$map_name-mods_to_download.txt"
:> "$tempfile" :> "$tempfile"
echo $tempfile
# load the server_modlist.txt, copying the mod id's we need to update # load the server_modlist.txt, copying the mod id's we need to update
# to the temp file, while skipping comments and blank lines # to the temp file, while skipping comments and blank lines
# #
@@ -135,11 +128,14 @@ update_mods_for_server() {
# 2545327648^dabsframework # 2545327648^dabsframework
# #
while read -r mod ; do while read -r mod ; do
echo "READ: $mod"
case "$mod" in case "$mod" in
\#*|''|' ') \#*|''|' ')
echo "BLANK: $mod"
;; ;;
*) *)
mod=${mod%%^*} mod=${mod%%^*}
echo "CONVERTED: $mod"
# check validity of syntax # check validity of syntax
if [ -z "$mod" ] ; then if [ -z "$mod" ] ; then