[27263] in Source-Commits

home help back first fref pref prev next nref lref last post

scripts commit: Add sanity check in dasource

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Sep 5 15:27:26 2013

Date: Thu, 5 Sep 2013 15:27:17 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201309051927.r85JRHEx030378@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/scripts/commit/3665d0e8d3ceca5ad33f09a4367f04bc9ecc0500
commit 3665d0e8d3ceca5ad33f09a4367f04bc9ecc0500
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Thu Sep 5 10:57:43 2013 -0400

    Add sanity check in dasource
    
    Ensure that if dasource is invoked with no args, the invoker really
    meant to build source packages for ALL THE PACKAGES EVER

 dasource |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dasource b/dasource
index d76e96a..a091fb1 100755
--- a/dasource
+++ b/dasource
@@ -182,11 +182,15 @@ if [ $# -gt 0 ]; then
     do_package $pkgname $pkgpath
   done
 else
+  echo -n "Really build ALL source packages? (y/N) "
+  read answer
+  if [ "$answer" = "y" ]; then
   # Build all source packages.
-  exec <"$packages"
-  while read pkgname pkgpath; do
-    do_package $pkgname $pkgpath
-  done
+    exec <"$packages"
+    while read pkgname pkgpath; do
+      do_package $pkgname $pkgpath
+    done
+  fi
 fi
 # Unset trap
 trap - EXIT

home help back first fref pref prev next nref lref last post