From: Pat Riehecky riehecky@fnal.gov
--- get_sources.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/get_sources.sh b/get_sources.sh index 6451bd0..b43cb51 100755 --- a/get_sources.sh +++ b/get_sources.sh @@ -18,6 +18,7 @@ fi
#parse command line args BRANCH='' +QUIET='' while (($# > 0)) do case $1 in @@ -31,6 +32,11 @@ do surl=$2 shift 2 ;; + -q) + # Be less chatty + QUIET='--silent' + shift + ;; esac done
@@ -92,7 +98,7 @@ while read -r fsha fname ; do if [ ! -e "${fname}" ]; then for br in "${branches[@]}" do - curl -f "${surl}/${pn}/${br}/${fsha}" -o "${fname}" && break + curl ${QUIET} -f "${surl}/${pn}/${br}/${fsha}" -o "${fname}" && break done else echo "${fname} exists. skipping"
On 06/23/2014 05:12 PM, Pat Riehecky wrote:
-q)
# Be less chatty
QUIET='--silent'
shift
;;
I dont mind if quiet were default, but vomit up content if exit -ne 0
On 06/23/2014 11:33 AM, Karanbir Singh wrote:
On 06/23/2014 05:12 PM, Pat Riehecky wrote:
-q)
# Be less chatty
QUIET='--silent'
shift
;;
I dont mind if quiet were default, but vomit up content if exit -ne 0
For some of the larger downloads (say, kernel source) depending on your bandwidth it might take a while causing some confusion.
While I would rather the quiet by default, I'm thinking from a 'new user education' perspective, being a bit more chatty about what is happening might be beneficial.
Pat
pushed
On 06/23/2014 11:12 AM, Pat Riehecky wrote:
From: Pat Riehecky riehecky@fnal.gov
get_sources.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/get_sources.sh b/get_sources.sh index 6451bd0..b43cb51 100755 --- a/get_sources.sh +++ b/get_sources.sh @@ -18,6 +18,7 @@ fi
#parse command line args BRANCH='' +QUIET='' while (($# > 0)) do case $1 in @@ -31,6 +32,11 @@ do surl=$2 shift 2 ;;
-q)
# Be less chatty
QUIET='--silent'
shift
esac;;
done
@@ -92,7 +98,7 @@ while read -r fsha fname ; do if [ ! -e "${fname}" ]; then for br in "${branches[@]}" do
curl -f "${surl}/${pn}/${br}/${fsha}" -o "${fname}" && break
else echo "${fname} exists. skipping"curl ${QUIET} -f "${surl}/${pn}/${br}/${fsha}" -o "${fname}" && break done