Skip to content

Commit

Permalink
fix(fastdl): correct fastdl file structure (#2450)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Birk <chris.h3o66@gmail.com>
  • Loading branch information
2 people authored and dgibbs64 committed Aug 24, 2019
1 parent debd737 commit 6761e50
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lgsm/functions/command_fastdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,21 @@ fn_fastdl_source(){
tput rc; tput el
printf "copying ${directory} ${allowed_extention} : ${fileswc}..."
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
cp "${fastdlfile}" "${fastdldir}/${directory}"
cp "${fastdlfile}" "${fastdldir}/${copytodir}"
exitcode=$?
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${directory}"
fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}"
core_exit.sh
else
fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${directory}"
fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}"
fi
done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention})
if [ ${fileswc} != 0 ]; then
Expand Down

0 comments on commit 6761e50

Please sign in to comment.