[util*] centralize the cache_tree path used by buildiso and deployiso

This commit is contained in:
udeved 2015-11-20 22:24:01 +01:00
parent ed5b947cd0
commit 2054ffe2ef
3 changed files with 7 additions and 7 deletions

View file

@ -615,7 +615,7 @@ load_profile(){
[[ -d ${work_dir}/root-image ]] && check_chroot_version "${work_dir}/root-image"
eval_edition "$1"
cache_dir_iso="${cache_dir}/iso/${iso_edition}/${dist_release}/$1"
cache_dir_iso="${cache_dir}/${cache_tree}/$1"
prepare_dir "${cache_dir_iso}"
}

View file

@ -10,24 +10,22 @@
# GNU General Public License for more details.
create_release(){
ssh !${remote_user}@${shell_url} mkdir -pv ${remote_target}/${remote_project}/${iso_edition}/${dist_release}
ssh !${remote_user}@${shell_url} mkdir -pv ${remote_target}/${remote_project}/${cache_tree}
}
sync_dir(){
msg "Start upload [$1] ..."
local empty=/tmp/deploy
rsync -aR -e ssh $empty/ ${sf_url}/${iso_edition}/
rsync -aR -e ssh $empty/ ${sf_url}/${iso_edition}/${dist_release}/
rsync -avP --progress -e ssh ${src_dir}/ ${sf_url}/${iso_edition}/${dist_release}/$1
# rsync -aq --rsync-path=”mkdir -p /tmp/${iso_edition}/${dist_release}/${profile}/ && rsync” ${src_dir}/ ${remote_user}@${shell_url}/${remote_target}/${remote_project}
rsync -aR -e ssh $empty/ ${sf_url}/${cache_tree}/
rsync -avP --progress -e ssh ${src_dir}/ ${sf_url}/${cache_tree}/$1
msg "Done upload"
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
}
set_src_dir(){
src_dir=${cache_dir}/iso/${iso_edition}/${dist_release}/$1
src_dir=${cache_dir}/${cache_tree}/$1
}
upload(){

View file

@ -427,6 +427,8 @@ init_buildiso(){
[[ -z ${use_overlayfs} ]] && use_overlayfs='true'
used_kernel=$(uname -r | cut -d . -f1)
[[ ${used_kernel} -lt "4" ]] && use_overlayfs='false'
cache_tree=iso/${iso_edition}/${dist_release}
}
init_deployiso(){