|
@@ -336,17 +336,21 @@ fn_fastdl_source(){
|
|
|
tput rc; tput el
|
|
tput rc; tput el
|
|
|
printf "copying ${directory} ${allowed_extention} : ${fileswc}..."
|
|
printf "copying ${directory} ${allowed_extention} : ${fileswc}..."
|
|
|
fn_sleep_time
|
|
fn_sleep_time
|
|
|
- if [ ! -d "${fastdldir}/${directory}" ]; then
|
|
|
|
|
- mkdir "${fastdldir}/${directory}"
|
|
|
|
|
|
|
+ # get relative path of file in the dir
|
|
|
|
|
+ tmprelfilepath="${fastdlfile#"${systemdir}/"}"
|
|
|
|
|
+ copytodir="${tmprelfilepath%/*}"
|
|
|
|
|
+ # create relative path for fastdl
|
|
|
|
|
+ if [ ! -d "${fastdldir}/${copytodir}" ]; then
|
|
|
|
|
+ mkdir -p "${fastdldir}/${copytodir}"
|
|
|
fi
|
|
fi
|
|
|
- cp "${fastdlfile}" "${fastdldir}/${directory}"
|
|
|
|
|
|
|
+ cp "${fastdlfile}" "${fastdldir}/${copytodir}"
|
|
|
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 "Copying ${fastdlfile} > ${fastdldir}/${directory}"
|
|
|
|
|
|
|
+ fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}"
|
|
|
core_exit.sh
|
|
core_exit.sh
|
|
|
else
|
|
else
|
|
|
- fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${directory}"
|
|
|
|
|
|
|
+ fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}"
|
|
|
fi
|
|
fi
|
|
|
done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention})
|
|
done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention})
|
|
|
if [ ${fileswc} != 0 ]; then
|
|
if [ ${fileswc} != 0 ]; then
|