forked from mirrored-repos/manjaro-tools
deployiso: tweal args and limit opt
This commit is contained in:
parent
1a9751b629
commit
0a4567a7b6
5 changed files with 38 additions and 7 deletions
28
README.md
28
README.md
|
@ -326,3 +326,31 @@ manjaro-chroot -a
|
|||
~~~
|
||||
manjaro-chroot /mnt /bin/bash
|
||||
~~~
|
||||
|
||||
###7. deployiso
|
||||
|
||||
deployiso is a script to upload a specific iso or a buiildset to SF.
|
||||
It needs to be run inside the iso-profiles directory.
|
||||
|
||||
~~~
|
||||
$ deployiso -h
|
||||
Usage: deployiso [options]
|
||||
-p Source folder to upload [default:default]
|
||||
-c Create new remote edition_type with subtree
|
||||
-u Update remote iso (diff only)
|
||||
-l Limit bandwidth in kB/s
|
||||
-q Query settings and pretend upload
|
||||
-h This help
|
||||
~~~
|
||||
|
||||
######* upload official buildset
|
||||
|
||||
~~~
|
||||
deployiso -p official -c
|
||||
~~~
|
||||
|
||||
######* upload xfce
|
||||
|
||||
~~~
|
||||
deployiso -p xfce -c
|
||||
~~~
|
||||
|
|
|
@ -48,10 +48,8 @@ display_settings(){
|
|||
msg2 "buildset_iso: ${buildset_iso}"
|
||||
msg2 "is_buildset: ${is_buildset}"
|
||||
|
||||
if [[ -n ${limit} ]];then
|
||||
msg "OPTIONS:"
|
||||
msg2 "limit: ${limit} kB/s"
|
||||
fi
|
||||
msg "OPTIONS:"
|
||||
msg2 "limit: ${limit} kB/s"
|
||||
|
||||
msg "ARGS:"
|
||||
msg2 "update: ${update}"
|
||||
|
@ -80,13 +78,13 @@ pretend=false
|
|||
remote_create=false
|
||||
update=false
|
||||
|
||||
rsync_args=(-aP --progress -e ssh)
|
||||
rsync_args=(-av --progress -e ssh)
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options]"
|
||||
echo " -p Source folder to upload [default:${buildset_iso}]"
|
||||
echo ' -c Create new remote edition_type with subtree'
|
||||
echo ' -u Update remote iso (diff only)'
|
||||
echo ' -u Update remote iso'
|
||||
echo ' -l Limit bandwidth in kB/s'
|
||||
echo ' -q Query settings and pretend upload'
|
||||
echo ' -h This help'
|
||||
|
|
|
@ -85,3 +85,6 @@
|
|||
|
||||
# the server user
|
||||
# remote_user=[SetUser]
|
||||
|
||||
# set upload bandwidth limit in kB/s
|
||||
# limit=100
|
||||
|
|
|
@ -21,7 +21,7 @@ sync_dir(){
|
|||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/
|
||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${remote_tree}/
|
||||
fi
|
||||
rsync ${rsync_args[*]} -v ${cache_dir_iso}/ ${sf_url}/${remote_tree}/$1
|
||||
rsync ${rsync_args[*]} ${cache_dir_iso}/ ${sf_url}/${remote_tree}/$1
|
||||
|
||||
msg "Done upload [$1]"
|
||||
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
||||
|
|
|
@ -453,6 +453,8 @@ init_deployiso(){
|
|||
[[ -z ${remote_user} ]] && remote_user="[SetUser]"
|
||||
|
||||
[[ -z ${remote_url} ]] && remote_url="sourceforge.net"
|
||||
|
||||
[[ -z ${limit} ]] && limit=100
|
||||
}
|
||||
|
||||
load_config(){
|
||||
|
|
Loading…
Reference in a new issue