forked from mirrored-repos/manjaro-tools
[deployiso] add verbose arg
This commit is contained in:
parent
33a471352a
commit
d3eb9bef1e
1 changed files with 8 additions and 4 deletions
|
@ -24,7 +24,7 @@ show_profile(){
|
|||
cd $1
|
||||
load_profile "$1"
|
||||
msg2 "cache_dir_iso: ${cache_dir_iso}"
|
||||
msg2 "remote_tree: ${remote_tree}/$1"
|
||||
msg2 "remote_tree: ${remote_tree}"
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ display_settings(){
|
|||
msg "ARGS:"
|
||||
msg2 "update: ${update}"
|
||||
msg2 "remote_create: ${remote_create}"
|
||||
msg2 "verbose: ${verbose}"
|
||||
msg2 "rsync_args: ${rsync_args[*]}"
|
||||
|
||||
msg "HOST:"
|
||||
|
@ -67,7 +68,7 @@ display_settings(){
|
|||
|
||||
msg "UPLOAD QUEUE:"
|
||||
show_upload_queue
|
||||
upload
|
||||
#upload
|
||||
}
|
||||
|
||||
load_user_info
|
||||
|
@ -78,8 +79,9 @@ load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
|||
pretend=false
|
||||
remote_create=false
|
||||
update=false
|
||||
verbose=false
|
||||
|
||||
rsync_args=(-avP --progress -e ssh)
|
||||
rsync_args=(-aP --progress -e ssh)
|
||||
|
||||
usage() {
|
||||
echo "Usage: ${0##*/} [options]"
|
||||
|
@ -88,13 +90,14 @@ usage() {
|
|||
echo ' -c Create new remote edition_type with subtree'
|
||||
echo ' -u Update remote iso'
|
||||
echo ' -q Query settings and pretend upload'
|
||||
echo ' -v Verbose output'
|
||||
echo ' -h This help'
|
||||
echo ''
|
||||
echo ''
|
||||
exit $1
|
||||
}
|
||||
|
||||
opts='p:l:cuqh'
|
||||
opts='p:l:cuvqh'
|
||||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
|
@ -102,6 +105,7 @@ while getopts "${opts}" arg; do
|
|||
l) limit="$OPTARG" ;;
|
||||
c) remote_create=true ;;
|
||||
u) update=true; rsync_args+=(-u) ;;
|
||||
v) verbose=true; rsync_args+=(-v --stats) ;;
|
||||
q) pretend=true; rsync_args+=(-n) ;;
|
||||
h|?) usage 0 ;;
|
||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||
|
|
Loading…
Reference in a new issue