Browse Source

Second pass cleaning & compressing output rework

pull/1331/head
UltimateByte 8 years ago
committed by GitHub
parent
commit
71dcf59378
  1. 17
      lgsm/functions/command_fastdl.sh

17
lgsm/functions/command_fastdl.sh

@ -259,11 +259,6 @@ fn_fastdl_gmod(){
else else
core_exit.sh core_exit.sh
fi fi
else
if [ "${gamename}" == "Garry's Mod" ]; then
fn_fastdl_gmod_lua_enforcer
fi
fn_fastdl_bzip2
fi fi
} }
@ -389,11 +384,6 @@ fn_fastdl_source(){
else else
core_exit.sh core_exit.sh
fi fi
else
if [ "${gamename}" == "Garry's Mod" ]; then
fn_fastdl_gmod_lua_enforcer
fi
fn_fastdl_bzip2
fi fi
} }
@ -434,8 +424,10 @@ fn_fastdl_gmod_lua_enforcer(){
} }
fn_fastdl_bzip2(){ fn_fastdl_bzip2(){
echo -en "compressing files..."
echo ""
while read -r filetocompress; do while read -r filetocompress; do
echo -en "compressing ${filetocompress}..." echo -en "\r\033[Kcompressing ${filetocompress}..."
bzip2 -f "${filetocompress}" bzip2 -f "${filetocompress}"
exitcode=$? exitcode=$?
if [ ${exitcode} -ne 0 ]; then if [ ${exitcode} -ne 0 ]; then
@ -447,14 +439,17 @@ fn_fastdl_bzip2(){
fn_script_log_pass "compressing ${filetocompress}" fn_script_log_pass "compressing ${filetocompress}"
fi fi
done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \)) done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \))
echo ""
} }
# Run functions # Run functions
if [ "${gamename}" == "Garry's Mod" ]; then if [ "${gamename}" == "Garry's Mod" ]; then
fn_fastdl_gmod fn_fastdl_gmod
fn_fastdl_gmod_lua_enforcer
else else
fn_fastdl_source fn_fastdl_source
fi fi
fn_fastdl_bzip2
# Finished message # Finished message
echo "FastDL files are located in:" echo "FastDL files are located in:"
echo "${webdir}" echo "${webdir}"

Loading…
Cancel
Save