forked from mirrored-repos/manjaro-tools
util-iso: simplify torrent code and fix display issue with webseed url
This commit is contained in:
parent
df796f592d
commit
7f68d03f84
1 changed files with 11 additions and 9 deletions
|
@ -594,15 +594,10 @@ sign_iso(){
|
||||||
}
|
}
|
||||||
|
|
||||||
make_torrent(){
|
make_torrent(){
|
||||||
msg2 "Creating torrent ..."
|
local fn=$(gen_iso_fn).torrent
|
||||||
local name=$(gen_iso_fn).torrent
|
msg2 "Creating (%s) ..." "${fn}"
|
||||||
[[ -f ${iso_dir}/${name} ]] && rm ${iso_dir}/${name}
|
[[ -f ${iso_dir}/${fn} ]] && rm ${iso_dir}/${fn}
|
||||||
if [[ "${edition}" == 'official' ]];then
|
mktorrent ${mktorrent_args[*]} -o ${iso_dir}/${fn} ${iso_dir}
|
||||||
set_remote_project "${edition}"
|
|
||||||
local webseed_url="http://${remote_url}/projects/${remote_project}/${dist_release}/${profile}/${iso_file}"
|
|
||||||
mktorrent_args+=(-w ${webseed_url})
|
|
||||||
fi
|
|
||||||
mktorrent ${mktorrent_args[*]} -o ${iso_dir}/${name} ${iso_dir}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compress_images(){
|
compress_images(){
|
||||||
|
@ -709,6 +704,13 @@ load_profile(){
|
||||||
prepare_dir "${iso_dir}"
|
prepare_dir "${iso_dir}"
|
||||||
|
|
||||||
mktorrent_args=(-v -p -l ${piece_size} -a ${tracker_url})
|
mktorrent_args=(-v -p -l ${piece_size} -a ${tracker_url})
|
||||||
|
|
||||||
|
if [[ "${edition}" == 'official' ]];then
|
||||||
|
set_remote_project "${edition}"
|
||||||
|
local webseed_url url="http://${remote_url}/projects/${remote_project}"
|
||||||
|
webseed_url="${url}/${dist_release}/${profile}/${iso_file}"
|
||||||
|
mktorrent_args+=(-w ${webseed_url})
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_edition(){
|
get_edition(){
|
||||||
|
|
Loading…
Reference in a new issue