From: Don Armstrong Date: Mon, 22 Jun 2015 22:45:13 +0000 (-0700) Subject: use parallel xargs; fix up calls to perl to deal with escaping X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e49092db576792553fa9caae0c427b1af7a88e63;p=bin.git use parallel xargs; fix up calls to perl to deal with escaping --- diff --git a/sign_and_upload_debian_r b/sign_and_upload_debian_r index 1475080..b0e402e 100755 --- a/sign_and_upload_debian_r +++ b/sign_and_upload_debian_r @@ -7,17 +7,9 @@ fi; KEYID=9D05D0BE; -if [ -z "$1" ]; then - BUILD_RESULTS="$(ssh $C2DEBMACHINE 'ls -td ~/c2d/build_results*|head -n1')" -else - BUILD_RESULTS="$1" -fi; - +set -x -ssh $C2DEBMACHINE find . -type f -iname '*.changes' -print0 \| \ - perl -n0e '$b = $_; $b =~ s/.changes/.upload/; -e $b || print $_.qq(\0);' | \ - xargs -0 debsign -r $C2DEBMACHINE -k$KEYID; +ssh $C2DEBMACHINE "find \$(echo c2d/build_results*) -type f -iname '*.changes' -print0 | perl -n0e 'next unless /.changes/; \$b = \$_; \$b =~ s/.changes/.upload/; -e \$b || print \$_;'" | \ + xargs -0r --verbose debsign -r $C2DEBMACHINE --re-sign -k$KEYID; -ssh $C2DEBMACHINE find . -type f -iname '*.changes' -print0 \| \ - perl -n0e '$b = $_; $b =~ s/.changes/.upload/; -e $b || print $_.qq(\0);' \| \ - xargs -0 dupload --to debianr; +ssh $C2DEBMACHINE "find \$(echo c2d/build_results*) -type f -iname '*.changes' -print0 | perl -n0e '\$b = \$_; \$b =~ s/.changes/.upload/; -e \$b || print \$_;'|xargs -P2 -n 40 --verbose -0r dupload --to debianr -k;"