mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +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
|
to:parallel@gnu.org, bug-parallel@gnu.org
|
||||||
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
|
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:
|
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:
|
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.
|
* Bug fixes and man page updates.
|
||||||
|
|
||||||
News about GNU Parallel:
|
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.
|
GNU Parallel - For people who live life in the parallel lane.
|
||||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -397,7 +397,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -378,7 +378,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -380,7 +380,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -395,7 +395,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -370,7 +370,7 @@ _parset_main() {
|
||||||
fi
|
fi
|
||||||
if [ "$_parset_NAME" = "--version" ] ; then
|
if [ "$_parset_NAME" = "--version" ] ; then
|
||||||
# shellcheck disable=SC2006
|
# 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 "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software"
|
||||||
echo "Foundation, Inc."
|
echo "Foundation, Inc."
|
||||||
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
$Global::progname="niceload";
|
$Global::progname="niceload";
|
||||||
$Global::version = 20220722;
|
$Global::version = 20220723;
|
||||||
Getopt::Long::Configure("bundling","require_order");
|
Getopt::Long::Configure("bundling","require_order");
|
||||||
get_options_from_array(\@ARGV) || die_usage();
|
get_options_from_array(\@ARGV) || die_usage();
|
||||||
if($opt::version) {
|
if($opt::version) {
|
||||||
|
|
60
src/parallel
60
src/parallel
|
@ -2658,7 +2658,7 @@ sub check_invalid_option_combinations() {
|
||||||
|
|
||||||
sub init_globals() {
|
sub init_globals() {
|
||||||
# Defaults:
|
# Defaults:
|
||||||
$Global::version = 20220722;
|
$Global::version = 20220723;
|
||||||
$Global::progname = 'parallel';
|
$Global::progname = 'parallel';
|
||||||
$::name = "GNU Parallel";
|
$::name = "GNU Parallel";
|
||||||
$Global::infinity = 2**31;
|
$Global::infinity = 2**31;
|
||||||
|
@ -8644,35 +8644,47 @@ sub rsync_transfer_cmd($) {
|
||||||
$self->rsync()." $file ".$self->{'host'}.":$rsync_destdir");
|
$self->rsync()." $file ".$self->{'host'}.":$rsync_destdir");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub rsync($) {
|
{
|
||||||
sub rsync_protocol {
|
my $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
|
sub rsync($) {
|
||||||
# Returns:
|
sub rsync_protocol {
|
||||||
# $rsync = "rsync" or "rsync --protocol 30"
|
# rsync 3.1.x uses protocol 31 which is unsupported by 2.5.7.
|
||||||
if(not $Global::rsync_protocol) {
|
# If the version >= 3.1.0: downgrade to protocol 30
|
||||||
my @out = `rsync --version`;
|
# Returns:
|
||||||
for (@out) {
|
# $rsync = "rsync" or "rsync --protocol 30"
|
||||||
# rsync version 3.1.3 protocol version 31
|
if(not $rsync_protocol) {
|
||||||
# rsync version v3.2.3 protocol version 31
|
my @out = `rsync --version`;
|
||||||
if(/version v?(\d+.\d+)(.\d+)?/) {
|
if(not @out) {
|
||||||
if($1 >= 3.1) {
|
if(::which("rsync")) {
|
||||||
# Version 3.1.0 or later: Downgrade to protocol 30
|
::die_bug("'rsync --version' gave no output.");
|
||||||
$Global::rsync_protocol = "rsync --protocol 30";
|
|
||||||
} else {
|
} 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
|
return $rsync_protocol;
|
||||||
::die_bug("Cannot figure out version of rsync: @out");
|
|
||||||
}
|
}
|
||||||
return $Global::rsync_protocol;
|
my $self = shift;
|
||||||
}
|
|
||||||
my $self = shift;
|
|
||||||
|
|
||||||
return rsync_protocol()." ".$ENV{'PARALLEL_RSYNC_OPTS'}.
|
return rsync_protocol()." ".$ENV{'PARALLEL_RSYNC_OPTS'}.
|
||||||
" -e".::Q($self->sshcmd());
|
" -e".::Q($self->sshcmd());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub cleanup_cmd($$$) {
|
sub cleanup_cmd($$$) {
|
||||||
|
|
|
@ -122,7 +122,7 @@ GetOptions(
|
||||||
"help" => \$opt::dummy,
|
"help" => \$opt::dummy,
|
||||||
) || exit(255);
|
) || exit(255);
|
||||||
$Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1];
|
$Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1];
|
||||||
$Global::version = 20220722;
|
$Global::version = 20220723;
|
||||||
if($opt::version) { version(); exit 0; }
|
if($opt::version) { version(); exit 0; }
|
||||||
@Global::sortoptions = grep { ! /^-D$/ }
|
@Global::sortoptions = grep { ! /^-D$/ }
|
||||||
shell_quote(@ARGV_before[0..($#ARGV_before-$#ARGV-1)]);
|
shell_quote(@ARGV_before[0..($#ARGV_before-$#ARGV-1)]);
|
||||||
|
|
2
src/sql
2
src/sql
|
@ -667,7 +667,7 @@ $Global::Initfile && unlink $Global::Initfile;
|
||||||
exit ($err);
|
exit ($err);
|
||||||
|
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
$Global::version = 20220722;
|
$Global::version = 20220723;
|
||||||
$Global::progname = 'sql';
|
$Global::progname = 'sql';
|
||||||
|
|
||||||
# This must be done first as this may exec myself
|
# This must be done first as this may exec myself
|
||||||
|
|
Loading…
Reference in a new issue