[lib] change remote_tree path
This commit is contained in:
parent
d3eb9bef1e
commit
766f1120a2
2 changed files with 14 additions and 8 deletions
|
@ -571,6 +571,9 @@ check_profile_conf(){
|
|||
if ! is_valid_init "${initsys}";then
|
||||
die "initsys only accepts openrc/systemd value!"
|
||||
fi
|
||||
if ! is_valid_edition "${edition_type}";then
|
||||
die "edition_type only accepts official/community/community-minimal/sonar/netrunner value!"
|
||||
fi
|
||||
if ! is_valid_bool "${autologin}";then
|
||||
die "autologin only accepts true/false value!"
|
||||
fi
|
||||
|
@ -615,9 +618,9 @@ load_profile(){
|
|||
|
||||
[[ -d ${work_dir}/root-image ]] && check_chroot_version "${work_dir}/root-image"
|
||||
|
||||
remote_tree="${edition_type}/${dist_release}"
|
||||
remote_tree="${edition_type}/$1/${dist_release}"
|
||||
|
||||
cache_dir_iso="${cache_dir}/iso/${remote_tree}/$1"
|
||||
cache_dir_iso="${cache_dir}/iso/${remote_tree}"
|
||||
prepare_dir "${cache_dir_iso}"
|
||||
}
|
||||
|
||||
|
|
|
@ -10,21 +10,24 @@
|
|||
# GNU General Public License for more details.
|
||||
|
||||
create_subtree_ssh(){
|
||||
ssh !${remote_user}@${shell_url} mkdir -pv ${remote_target}/${remote_project}/${remote_tree}
|
||||
local tree=${remote_target}/${remote_project}/${remote_tree}
|
||||
ssh !${remote_user}@${shell_url} [[ ! -d $tree ]] && mkdir -pv $tree
|
||||
}
|
||||
|
||||
create_subtree(){
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${remote_tree}/
|
||||
msg "Create ${edition_type}/$1 ..."
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/$1
|
||||
msg "Done"
|
||||
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
||||
}
|
||||
|
||||
sync_dir(){
|
||||
cd $1
|
||||
load_profile "$1"
|
||||
${remote_create} && create_subtree "$1"
|
||||
msg "Start upload [$1] ..."
|
||||
${remote_create} && create_subtree
|
||||
rsync ${rsync_args[*]} ${cache_dir_iso}/ ${sf_url}/${remote_tree}/$1
|
||||
|
||||
rsync ${rsync_args[*]} ${cache_dir_iso}/ ${sf_url}/${remote_tree}/
|
||||
msg "Done upload [$1]"
|
||||
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
||||
cd ..
|
||||
|
|
Loading…
Reference in a new issue