Bladeren bron

various fixes

UltimateByte 9 jaren geleden
bovenliggende
commit
e830e8f942
1 gewijzigde bestanden met toevoegingen van 18 en 3 verwijderingen
  1. 18 3
      lgsm/functions/mods_core.sh

+ 18 - 3
lgsm/functions/mods_core.sh

@@ -121,7 +121,7 @@ fn_mod_tidy_files_list(){
 	sleep 0.5
 	sleep 0.5
 	fn_script_log_info "Tidy up ${modcommand}-files.txt"
 	fn_script_log_info "Tidy up ${modcommand}-files.txt"
 	# Lines/files to remove from file list (end with ";" separator)
 	# Lines/files to remove from file list (end with ";" separator)
-	removefromlist="cfg;addons;"
+	removefromlist="cfg;addons;RustDedicated_Data;RustDedicated_Data/Managed;RustDedicated_Data/Managed/x86;"
 	# Loop through files to remove from file list,
 	# Loop through files to remove from file list,
 	# generate elements to remove from list
 	# generate elements to remove from list
 	removefromlistamount="$(echo "${removefromlist}" | awk -F ';' '{ print NF }')"
 	removefromlistamount="$(echo "${removefromlist}" | awk -F ';' '{ print NF }')"
@@ -344,6 +344,21 @@ fn_mod_compatible_test(){
 
 
 # Create mods files and directories if it doesn't exist
 # Create mods files and directories if it doesn't exist
 fn_create_mods_dir(){
 fn_create_mods_dir(){
+	# Create lgsm data modsdir
+	if [ ! -d "${modsdir}" ];then
+		echo "creating lgsm mods data directory ${modsdir}..."
+		mkdir -p "${modsdir}"
+		exitcode=$?
+		if [ ${exitcode} -ne 0 ]; then
+			fn_print_fail_eol_nl
+			fn_script_log_fatal "Creating mod download dir ${modsdir}"
+			core_exit.sh
+		else
+			fn_print_ok_eol_nl
+			fn_script_log_pass "Creating mod download dir ${modsdir}"
+		fi
+		sleep 0.5
+	fi
 	# Create mod install directory
 	# Create mod install directory
 	if [ ! -d "${modinstalldir}" ]; then
 	if [ ! -d "${modinstalldir}" ]; then
 		echo "creating mods install directory ${modinstalldir}..."
 		echo "creating mods install directory ${modinstalldir}..."
@@ -351,11 +366,11 @@ fn_create_mods_dir(){
 		exitcode=$?
 		exitcode=$?
 		if [ ${exitcode} -ne 0 ]; then
 		if [ ${exitcode} -ne 0 ]; then
 			fn_print_fail_eol_nl
 			fn_print_fail_eol_nl
-			fn_script_log_fatal "Creating mod download dir ${modinstalldir}"
+			fn_script_log_fatal "Creating mod install directory ${modinstalldir}"
 			core_exit.sh
 			core_exit.sh
 		else
 		else
 			fn_print_ok_eol_nl
 			fn_print_ok_eol_nl
-			fn_script_log_pass "Creating mod download dir ${modinstalldir}"
+			fn_script_log_pass "Creating mod install directory ${modinstalldir}"
 		fi
 		fi
 		sleep 0.5
 		sleep 0.5
 	fi
 	fi