From 4564d5bb10e62d1220f5530f45574edf3fdf3aab Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 3 Dec 2015 16:05:21 +0100 Subject: [PATCH] [deployiso] make it run anywhere in the filesystem --- bin/deployiso.in | 6 ++++-- lib/util-publish.sh | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/deployiso.in b/bin/deployiso.in index 581e04c..c1fdf57 100644 --- a/bin/deployiso.in +++ b/bin/deployiso.in @@ -21,12 +21,12 @@ import ${LIBDIR}/util-publish.sh show_profile(){ eval_edition "$1" - cd ${cache_dir_iso}/${edition_type}/$1 + cd ${run_dir}/${edition_type}/$1 msg3 "Iso: [$1]" prepare_transfer "$1" msg2 "src_dir: ${src_dir}" msg2 "remote_dir: ${remote_dir}" - cd ${cache_dir_iso} + cd ${run_dir} } display_settings(){ @@ -118,6 +118,8 @@ rsync_args+=(--bwlimit=${limit}) sf_url=${remote_user},${remote_project}@frs.${remote_url}:${remote_target}/${remote_project} shell_url=${remote_user},${remote_project}@shell.${remote_url} +cd ${run_dir} + ${pretend} && display_settings && exit 1 run sync_dir "${buildset_iso}" diff --git a/lib/util-publish.sh b/lib/util-publish.sh index dd0d7d0..d3c07a0 100644 --- a/lib/util-publish.sh +++ b/lib/util-publish.sh @@ -25,17 +25,17 @@ create_subtree(){ prepare_transfer(){ remote_dir="${edition_type}/$1/${dist_release}/${arch}" - src_dir="${cache_dir_iso}/${remote_dir}" + src_dir="${run_dir}/${remote_dir}" } sync_dir(){ eval_edition "$1" - cd ${cache_dir_iso}/${edition_type}/$1 + cd ${run_dir}/${edition_type}/$1 prepare_transfer "$1" ${remote_create} && create_subtree "$1" msg "Start upload [$1] (${arch}) ..." rsync ${rsync_args[*]} ${src_dir}/ ${sf_url}/${remote_dir}/ msg "Done upload [$1]" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes" - cd ${cache_dir_iso} + cd ${run_dir} }