mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
parallel: Better error message if 'rsync' is not in $PATH.
This commit is contained in:
parent
9a96fb0103
commit
14249876fc
|
@ -254,29 +254,24 @@ from:tange@gnu.org
|
|||
to:parallel@gnu.org, bug-parallel@gnu.org
|
||||
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
|
||||
|
||||
Subject: GNU Parallel 20220722 ('Roe vs Wade') released
|
||||
Subject: GNU Parallel 20220822 ('<<>>') released
|
||||
|
||||
GNU Parallel 20220722 ('Roe vs Wade') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
GNU Parallel 20220822 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
|
||||
Quote of the month:
|
||||
|
||||
The syntax for GNU Parallel is so slick that I often use it just to make my script read nicer, and the parallelism is a cherry on top.
|
||||
-- Epistaxis@reddit
|
||||
<<>>
|
||||
|
||||
|
||||
New in this release:
|
||||
|
||||
* --colour-failed will color output red if the job fails.
|
||||
|
||||
* sql: support for InfluxDB.
|
||||
|
||||
* Polarhome.com is dead, so these OSs are no longer supported: AIX HPUX IRIX Minix OPENSTEP OpenIndiana OpenServer QNX Solaris Syllable Tru64 Ultrix UnixWare.
|
||||
<<>>
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
News about GNU Parallel:
|
||||
|
||||
* GNU Parallel used in "Hitting the Target" https://www.centrefornetzero.org/wp-content/uploads/2022/05/ABM-Report-Final.pdf
|
||||
<<>>
|
||||
|
||||
|
||||
GNU Parallel - For people who live life in the parallel lane.
|
||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -397,7 +397,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -378,7 +378,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -380,7 +380,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -370,7 +370,7 @@ _parset_main() {
|
|||
fi
|
||||
if [ "$_parset_NAME" = "--version" ] ; then
|
||||
# shellcheck disable=SC2006
|
||||
echo "parset 20220722 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "parset 20220723 (GNU parallel `parallel --minversion 1`)"
|
||||
echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||
echo "Foundation, Inc."
|
||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
use strict;
|
||||
use Getopt::Long;
|
||||
$Global::progname="niceload";
|
||||
$Global::version = 20220722;
|
||||
$Global::version = 20220723;
|
||||
Getopt::Long::Configure("bundling","require_order");
|
||||
get_options_from_array(\@ARGV) || die_usage();
|
||||
if($opt::version) {
|
||||
|
|
60
src/parallel
60
src/parallel
|
@ -2658,7 +2658,7 @@ sub check_invalid_option_combinations() {
|
|||
|
||||
sub init_globals() {
|
||||
# Defaults:
|
||||
$Global::version = 20220722;
|
||||
$Global::version = 20220723;
|
||||
$Global::progname = 'parallel';
|
||||
$::name = "GNU Parallel";
|
||||
$Global::infinity = 2**31;
|
||||
|
@ -8644,35 +8644,47 @@ sub rsync_transfer_cmd($) {
|
|||
$self->rsync()." $file ".$self->{'host'}.":$rsync_destdir");
|
||||
}
|
||||
|
||||
sub rsync($) {
|
||||
sub rsync_protocol {
|
||||
# rsync 3.1.x uses protocol 31 which is unsupported by 2.5.7.
|
||||
# If the version >= 3.1.0: downgrade to protocol 30
|
||||
# Returns:
|
||||
# $rsync = "rsync" or "rsync --protocol 30"
|
||||
if(not $Global::rsync_protocol) {
|
||||
my @out = `rsync --version`;
|
||||
for (@out) {
|
||||
# rsync version 3.1.3 protocol version 31
|
||||
# rsync version v3.2.3 protocol version 31
|
||||
if(/version v?(\d+.\d+)(.\d+)?/) {
|
||||
if($1 >= 3.1) {
|
||||
# Version 3.1.0 or later: Downgrade to protocol 30
|
||||
$Global::rsync_protocol = "rsync --protocol 30";
|
||||
{
|
||||
my $rsync_protocol;
|
||||
|
||||
sub rsync($) {
|
||||
sub rsync_protocol {
|
||||
# rsync 3.1.x uses protocol 31 which is unsupported by 2.5.7.
|
||||
# If the version >= 3.1.0: downgrade to protocol 30
|
||||
# Returns:
|
||||
# $rsync = "rsync" or "rsync --protocol 30"
|
||||
if(not $rsync_protocol) {
|
||||
my @out = `rsync --version`;
|
||||
if(not @out) {
|
||||
if(::which("rsync")) {
|
||||
::die_bug("'rsync --version' gave no output.");
|
||||
} else {
|
||||
$Global::rsync_protocol = "rsync";
|
||||
::error("'rsync' is not in \$PATH.");
|
||||
::wait_and_exit(255);
|
||||
}
|
||||
}
|
||||
for (@out) {
|
||||
# rsync version 3.1.3 protocol version 31
|
||||
# rsync version v3.2.3 protocol version 31
|
||||
if(/version v?(\d+.\d+)(.\d+)?/) {
|
||||
if($1 >= 3.1) {
|
||||
# Version 3.1.0 or later: Downgrade to protocol 30
|
||||
$rsync_protocol = "rsync --protocol 30";
|
||||
} else {
|
||||
$rsync_protocol = "rsync";
|
||||
}
|
||||
}
|
||||
}
|
||||
$rsync_protocol or
|
||||
::die_bug("Cannot figure out version of rsync: @out");
|
||||
}
|
||||
$Global::rsync_protocol or
|
||||
::die_bug("Cannot figure out version of rsync: @out");
|
||||
return $rsync_protocol;
|
||||
}
|
||||
return $Global::rsync_protocol;
|
||||
}
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
|
||||
return rsync_protocol()." ".$ENV{'PARALLEL_RSYNC_OPTS'}.
|
||||
" -e".::Q($self->sshcmd());
|
||||
return rsync_protocol()." ".$ENV{'PARALLEL_RSYNC_OPTS'}.
|
||||
" -e".::Q($self->sshcmd());
|
||||
}
|
||||
}
|
||||
|
||||
sub cleanup_cmd($$$) {
|
||||
|
|
|
@ -122,7 +122,7 @@ GetOptions(
|
|||
"help" => \$opt::dummy,
|
||||
) || exit(255);
|
||||
$Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1];
|
||||
$Global::version = 20220722;
|
||||
$Global::version = 20220723;
|
||||
if($opt::version) { version(); exit 0; }
|
||||
@Global::sortoptions = grep { ! /^-D$/ }
|
||||
shell_quote(@ARGV_before[0..($#ARGV_before-$#ARGV-1)]);
|
||||
|
|
Loading…
Reference in a new issue