|
@ -20,9 +20,13 @@ addonsdir="${systemdir}/addons" |
|
|
luasvautorundir="${systemdir}/lua/autorun/server" |
|
|
luasvautorundir="${systemdir}/lua/autorun/server" |
|
|
luafastdlfile="lgsm_cl_force_fastdl.lua" |
|
|
luafastdlfile="lgsm_cl_force_fastdl.lua" |
|
|
luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" |
|
|
luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" |
|
|
|
|
|
# Only Source supports bzip2 compression. |
|
|
|
|
|
if [ "${engine}" == "source" ]; then |
|
|
|
|
|
supportsbzip="" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
# Check if bzip2 is installed. |
|
|
# Check if bzip2 is installed. |
|
|
if [ ! "$(command -v bzip2 2> /dev/null)" ]; then |
|
|
if [ -v supportsbzip ] && [ ! "$(command -v bzip2 2> /dev/null)" ]; then |
|
|
fn_print_fail "bzip2 is not installed" |
|
|
fn_print_fail "bzip2 is not installed" |
|
|
fn_script_log_fail "bzip2 is not installed" |
|
|
fn_script_log_fail "bzip2 is not installed" |
|
|
core_exit.sh |
|
|
core_exit.sh |
|
@ -225,7 +229,10 @@ fn_fastdl_preview() { |
|
|
fn_script_log_fail "Generating file list." |
|
|
fn_script_log_fail "Generating file list." |
|
|
core_exit.sh |
|
|
core_exit.sh |
|
|
fi |
|
|
fi |
|
|
echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" |
|
|
if [ -v supportsbzip ]; then |
|
|
|
|
|
compressionmessage="about to compress ${totalfiles} files, " |
|
|
|
|
|
fi |
|
|
|
|
|
echo -e "${compressionmessage}total size $(fn_human_readable_file_size ${filesizetotal} 0)" |
|
|
fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" |
|
|
fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" |
|
|
rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" |
|
|
rm -f "${tmpdir:?}/fastdl_files_to_compress.txt" |
|
|
if ! fn_prompt_yn "Continue?" Y; then |
|
|
if ! fn_prompt_yn "Continue?" Y; then |
|
@ -431,7 +438,9 @@ fn_fastdl_preview |
|
|
fn_clear_old_fastdl |
|
|
fn_clear_old_fastdl |
|
|
fn_fastdl_dirs |
|
|
fn_fastdl_dirs |
|
|
fn_fastdl_build |
|
|
fn_fastdl_build |
|
|
fn_fastdl_bzip2 |
|
|
if [ -v supportsbzip ]; then |
|
|
|
|
|
fn_fastdl_bzip2 |
|
|
|
|
|
fi |
|
|
# Finished message. |
|
|
# Finished message. |
|
|
echo -e "FastDL files are located in:" |
|
|
echo -e "FastDL files are located in:" |
|
|
echo -e "${fastdldir}" |
|
|
echo -e "${fastdldir}" |
|
|