support/download: rename internal 'verbose' variable where applicable
Most 'verbose' variable inside the download helpers actually mean 'quiet'. I.e. they are assigned in case quiet operation is requested, and empty in case of non-quiet operation. Using the name 'verbose' for such a variable is confusing, especially when you want to test the variable on emptiness or non-emptiness (in a subsequent commit). Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
ec0b716c4b
commit
3300788ce0
|
@ -16,10 +16,10 @@ set -e
|
||||||
# BZR : the bzr command to call
|
# BZR : the bzr command to call
|
||||||
|
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q;;
|
q) quiet=-q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
u) uri="${OPTARG}";;
|
u) uri="${OPTARG}";;
|
||||||
c) cset="${OPTARG}";;
|
c) cset="${OPTARG}";;
|
||||||
|
@ -53,6 +53,6 @@ if [ ${bzr_version} -ge ${bzr_min_version} ]; then
|
||||||
timestamp_opt="--per-file-timestamps"
|
timestamp_opt="--per-file-timestamps"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_bzr export ${verbose} --root="'${basename}/'" --format=tgz \
|
_bzr export ${quiet} --root="'${basename}/'" --format=tgz \
|
||||||
${timestamp_opt} - "${@}" "'${uri}'" -r "'${cset}'" \
|
${timestamp_opt} - "${@}" "'${uri}'" -r "'${cset}'" \
|
||||||
>"${output}"
|
>"${output}"
|
||||||
|
|
|
@ -16,10 +16,10 @@ set -e
|
||||||
# Environment:
|
# Environment:
|
||||||
# CVS : the cvs command to call
|
# CVS : the cvs command to call
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-Q;;
|
q) quiet=-Q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
u) uri="${OPTARG#*://}";;
|
u) uri="${OPTARG#*://}";;
|
||||||
c) rev="${OPTARG}";;
|
c) rev="${OPTARG}";;
|
||||||
|
@ -57,7 +57,7 @@ if [[ ! "${uri}" =~ ^: ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export TZ=UTC
|
export TZ=UTC
|
||||||
_cvs ${verbose} -z3 -d"'${uri}'" \
|
_cvs ${quiet} -z3 -d"'${uri}'" \
|
||||||
co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
|
co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
|
||||||
|
|
||||||
tar czf "${output}" "${basename}"
|
tar czf "${output}" "${basename}"
|
||||||
|
|
|
@ -50,11 +50,11 @@ _on_error() {
|
||||||
exec "${myname}" "${OPTS[@]}" || exit ${ret}
|
exec "${myname}" "${OPTS[@]}" || exit ${ret}
|
||||||
}
|
}
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
recurse=0
|
recurse=0
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q; exec >/dev/null;;
|
q) quiet=-q; exec >/dev/null;;
|
||||||
r) recurse=1;;
|
r) recurse=1;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
u) uri="${OPTARG}";;
|
u) uri="${OPTARG}";;
|
||||||
|
|
|
@ -15,10 +15,10 @@ set -e
|
||||||
# Environment:
|
# Environment:
|
||||||
# HG : the hg command to call
|
# HG : the hg command to call
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q;;
|
q) quiet=-q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
u) uri="${OPTARG}";;
|
u) uri="${OPTARG}";;
|
||||||
c) cset="${OPTARG}";;
|
c) cset="${OPTARG}";;
|
||||||
|
@ -36,8 +36,8 @@ _hg() {
|
||||||
eval ${HG} "${@}"
|
eval ${HG} "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_hg clone ${verbose} "${@}" --noupdate "'${uri}'" "'${basename}'"
|
_hg clone ${quiet} "${@}" --noupdate "'${uri}'" "'${basename}'"
|
||||||
|
|
||||||
_hg archive ${verbose} --repository "'${basename}'" --type tgz \
|
_hg archive ${quiet} --repository "'${basename}'" --type tgz \
|
||||||
--prefix "'${basename}'" --rev "'${cset}'" \
|
--prefix "'${basename}'" --rev "'${cset}'" \
|
||||||
- >"${output}"
|
- >"${output}"
|
||||||
|
|
|
@ -14,10 +14,10 @@ set -e
|
||||||
# Environment:
|
# Environment:
|
||||||
# SCP : the scp command to call
|
# SCP : the scp command to call
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q;;
|
q) quiet=-q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
f) filename="${OPTARG}";;
|
f) filename="${OPTARG}";;
|
||||||
u) uri="${OPTARG}";;
|
u) uri="${OPTARG}";;
|
||||||
|
@ -37,4 +37,4 @@ _scp() {
|
||||||
# Remove any scheme prefix
|
# Remove any scheme prefix
|
||||||
uri="${uri##scp://}"
|
uri="${uri##scp://}"
|
||||||
|
|
||||||
_scp ${verbose} "${@}" "'${uri}/${filename}'" "'${output}'"
|
_scp ${quiet} "${@}" "'${uri}/${filename}'" "'${output}'"
|
||||||
|
|
|
@ -22,10 +22,10 @@ set -e
|
||||||
|
|
||||||
. "${0%/*}/helpers"
|
. "${0%/*}/helpers"
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q;;
|
q) quiet=-q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
u) uri="${OPTARG}";;
|
u) uri="${OPTARG}";;
|
||||||
c) rev="${OPTARG}";;
|
c) rev="${OPTARG}";;
|
||||||
|
@ -43,7 +43,7 @@ _svn() {
|
||||||
eval ${SVN} "${@}"
|
eval ${SVN} "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_svn export --ignore-keywords ${verbose} "${@}" "'${uri}@${rev}'" "'${basename}'"
|
_svn export --ignore-keywords ${quiet} "${@}" "'${uri}@${rev}'" "'${basename}'"
|
||||||
|
|
||||||
# Get the date of the revision, to generate reproducible archives.
|
# Get the date of the revision, to generate reproducible archives.
|
||||||
# The output format is YYYY-MM-DDTHH:MM:SS.mmmuuuZ (i.e. always in the
|
# The output format is YYYY-MM-DDTHH:MM:SS.mmmuuuZ (i.e. always in the
|
||||||
|
|
|
@ -15,10 +15,10 @@ set -e
|
||||||
# Environment:
|
# Environment:
|
||||||
# WGET : the wget command to call
|
# WGET : the wget command to call
|
||||||
|
|
||||||
verbose=
|
quiet=
|
||||||
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
|
||||||
case "${OPT}" in
|
case "${OPT}" in
|
||||||
q) verbose=-q;;
|
q) quiet=-q;;
|
||||||
o) output="${OPTARG}";;
|
o) output="${OPTARG}";;
|
||||||
f) filename="${OPTARG}";;
|
f) filename="${OPTARG}";;
|
||||||
u) url="${OPTARG}";;
|
u) url="${OPTARG}";;
|
||||||
|
@ -40,4 +40,4 @@ _wget() {
|
||||||
# mirror
|
# mirror
|
||||||
[ -n "${encode}" ] && filename=${filename//\?/%3F}
|
[ -n "${encode}" ] && filename=${filename//\?/%3F}
|
||||||
|
|
||||||
_wget ${verbose} "${@}" -O "'${output}'" "'${url}/${filename}'"
|
_wget ${quiet} "${@}" -O "'${output}'" "'${url}/${filename}'"
|
||||||
|
|
Loading…
Reference in a new issue