forked from mirrored-repos/manjaro-tools
make edition global var
This commit is contained in:
parent
f75ab1de22
commit
1ce733f2c6
3 changed files with 16 additions and 18 deletions
|
@ -616,7 +616,7 @@ load_profile(){
|
|||
|
||||
[[ -d ${work_dir}/root-image ]] && check_chroot_version "${work_dir}/root-image"
|
||||
|
||||
iso_dir="${cache_dir_iso}/$prof/${dist_release}/${arch}"
|
||||
iso_dir="${cache_dir_iso}/${edition}/$prof/${dist_release}/${arch}"
|
||||
|
||||
prepare_dir "${iso_dir}"
|
||||
}
|
||||
|
|
|
@ -15,27 +15,25 @@ create_subtree_ssh(){
|
|||
}
|
||||
|
||||
create_subtree(){
|
||||
msg2 "Create (${edition_type}/$1/${dist_release}) ..."
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/$1/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/$1/${dist_release}/
|
||||
msg2 "Create (${edition}/$1/${dist_release}) ..."
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition}/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition}/$1/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition}/$1/${dist_release}/
|
||||
msg2 "Done"
|
||||
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
||||
}
|
||||
|
||||
prepare_transfer(){
|
||||
remote_dir="${edition_type}/$1/${dist_release}/${arch}"
|
||||
remote_dir="${edition}/$1/${dist_release}/${arch}"
|
||||
src_dir="${run_dir}/${remote_dir}"
|
||||
}
|
||||
|
||||
sync_dir(){
|
||||
eval_edition "$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 ${run_dir}
|
||||
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"
|
||||
}
|
||||
|
|
|
@ -40,11 +40,11 @@ eval_buildset(){
|
|||
}
|
||||
|
||||
eval_edition(){
|
||||
local result=$(find ${run_dir} -maxdepth 2 -name "$1") path
|
||||
local result=$(find ${run_dir} -maxdepth 2 -name "$1")
|
||||
[[ -z $result ]] && die "$1 is not a valid profile or buildset!"
|
||||
path=${result%/*}
|
||||
path=${path##*/}
|
||||
edition_dir=${run_dir}/${path}
|
||||
edition=${result%/*}
|
||||
edition=${edition##*/}
|
||||
edition_dir=${run_dir}/${edition}
|
||||
}
|
||||
|
||||
get_timer(){
|
||||
|
|
Loading…
Reference in a new issue