]> git.donarmstrong.com Git - neurodebian.git/commitdiff
ENH: run nd_updatedist in parallel using parallel from moreutils
authorYaroslav Halchenko <debian@onerussian.com>
Fri, 25 Mar 2011 19:00:25 +0000 (15:00 -0400)
committerNeuroDebian Mega-user <neurodebian@head2.hydra.dartmouth.edu>
Fri, 25 Mar 2011 19:00:25 +0000 (15:00 -0400)
debian/control
tools/nd_updateall
tools/nd_updatedist

index 800ca0fb44ccfd2571766d49d249cef1540f829b..32aa130effb5a88e4e6176129a282093d19dba8a 100644 (file)
@@ -14,7 +14,7 @@ XS-DM-Upload-Allowed: yes
 Package: neurodebian-dev
 Architecture: all
 Depends: ${misc:Depends}, devscripts, cowbuilder, python, neurodebian-keyring
-Recommends: virtualbox-ose, virtualbox-ose-fuse, zerofree
+Recommends: virtualbox-ose, virtualbox-ose-fuse, zerofree, moreutils
 Suggests:
 Description: NeuroDebian development tools
  neuro.debian.net sphinx website sources and development tools used by
index aaf30c5f1ffbfd58cc420edbe8537f87657dc24e..150d97c6f68a40deb4551b58b5f4e4fcc787770d 100755 (executable)
@@ -2,9 +2,15 @@
 
 . /etc/neurodebian/cmdsettings.sh
 
-for d in $alldists; do
-  dfamily=${d%%-*}
-  drelease=${d##*-}
-
-  nd_updatedist $dfamily $drelease
-done
+if [ -z "$SERIAL" ]; then
+    parallel nd_updatedist -- $alldists
+else
+    # Original serial version, we might want to switch between the two
+    # upon -j
+    for d in $alldists; do
+      dfamily=${d%%-*}
+      drelease=${d##*-}
+    
+      nd_updatedist $dfamily $drelease
+    done
+fi
index 8a92ac8601858cbdf271811dd840e8784431425b..0d95309bb6a62334c4632852bf03710b261a83d1 100755 (executable)
@@ -1,7 +1,12 @@
 #!/bin/bash
 
-family=$1
-dist=$2
+if [ $# -eq 1 ]; then
+  family=${1%%-*}
+  dist=${1##*-}
+elif [ $# -eq 2 ]; then
+  family=$1
+  dist=$2
+fi
 
 set -e
 
@@ -15,7 +20,7 @@ if [ -z "$dist" ]; then
   exit 1
 fi
 
-. /etc/neurodebian/cmdsettings.sh
+. /etc/neurodebian/cmdsettings.sh "$family" "$dist"
 
 # common options
 opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"