Browse Source

improve quietness flag

tags/0.1
devrandom 9 years ago
parent
commit
10b40d5ad5
3 changed files with 15 additions and 4 deletions
  1. 3
    2
      bin/gbuild
  2. 6
    1
      libexec/copy-from-target
  3. 6
    1
      libexec/copy-to-target

+ 3
- 2
bin/gbuild View File

@@ -64,7 +64,7 @@ def build_one_configuration(suite, arch, build_desc, reference_datetime)

build_desc["files"].each do |filename|
filename = sanitize(filename, "files section")
system! "cd inputs && copy-to-target #{filename} build/"
system! "cd inputs && copy-to-target #{@quiet_flag} #{filename} build/"
end

info "Updating apt-get repository (log in var/install.log)"
@@ -134,6 +134,7 @@ ENV['PATH'] = libexec_dir.to_s + ":" + ENV['PATH']
ENV['GITIAN_BASE'] = base_dir.to_s
ENV['NPROCS'] = @options[:num_procs].to_s
ENV['VMEM'] = @options[:memory].to_s
@quiet_flag = @options[:quiet] ? "-q" : ""

build_desc_file = ARGV.shift or raise "must supply YAML build description file"

@@ -192,7 +193,7 @@ suites.each do |suite|
build_one_configuration(suite, arch, build_desc, reference_datetime)

info "Grabbing results"
system! "copy-from-target out #{build_dir}"
system! "copy-from-target #{@quiet_flag} out #{build_dir}"

base_manifest = File.read("var/base-#{suite}-#{arch}.manifest")
base_manifests["#{suite}-#{arch}"] = base_manifest

+ 6
- 1
libexec/copy-from-target View File

@@ -3,6 +3,7 @@
. gconfig

TUSER=ubuntu
QUIET_FLAG=

usage() {
echo "Usage: ${0##*/} [OPTION]... <command>"
@@ -25,6 +26,10 @@ if [ $# != 0 ] ; then
TUSER="$2"
shift 2
;;
--quiet|-q)
QUIET_FLAG="-q"
shift 1
;;
--*)
echo "unrecognized option $1"
exit 1
@@ -41,4 +46,4 @@ if [ $# = 0 ] ; then
exit 1
fi

scp -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT -r $TUSER@localhost:$1 $2
scp $QUIET_FLAG -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT -r $TUSER@localhost:$1 $2

+ 6
- 1
libexec/copy-to-target View File

@@ -3,6 +3,7 @@
. gconfig

TUSER=ubuntu
QUIET_FLAG=

usage() {
echo "Usage: ${0##*/} [OPTION]... <command>"
@@ -25,6 +26,10 @@ if [ $# != 0 ] ; then
TUSER="$2"
shift 2
;;
--quiet|-q)
QUIET_FLAG="-q"
shift 1
;;
--*)
echo "unrecognized option $1"
exit 1
@@ -41,4 +46,4 @@ if [ $# = 0 ] ; then
exit 1
fi

scp -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT $1 $TUSER@localhost:$2
scp $QUIET_FLAG -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT $1 $TUSER@localhost:$2

Loading…
Cancel
Save