mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
src/parallel: Deal with unset $HOME.
This commit is contained in:
parent
111fa14f57
commit
56e5118535
|
@ -12,7 +12,7 @@
|
||||||
#
|
#
|
||||||
# It first tries to install it globally.
|
# It first tries to install it globally.
|
||||||
# If that fails, it does a personal installation.
|
# If that fails, it does a personal installation.
|
||||||
# If that fails, it does copies to $HOME/bin
|
# If that fails, it copies to $HOME/bin
|
||||||
|
|
||||||
LATEST=$(wget -qO- http://ftpmirror.gnu.org/parallel | perl -ne '/(parallel-\d{8})/ and print $1."\n"' | sort | tail -n1)
|
LATEST=$(wget -qO- http://ftpmirror.gnu.org/parallel | perl -ne '/(parallel-\d{8})/ and print $1."\n"' | sort | tail -n1)
|
||||||
if test \! -d $LATEST/src/; then
|
if test \! -d $LATEST/src/; then
|
||||||
|
|
|
@ -195,9 +195,9 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
|
||||||
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
|
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
|
||||||
Jesse Alama <jesse.alama@gmail.com>
|
Jesse Alama <jesse.alama@gmail.com>
|
||||||
|
|
||||||
Subject: GNU Parallel 20130722 ('') released
|
Subject: GNU Parallel 20130722 ('Engelbart') released
|
||||||
|
|
||||||
GNU Parallel 20130722 ('') has been released. It is
|
GNU Parallel 20130722 ('Engelbart') has been released. It is
|
||||||
available for download at: http://ftp.gnu.org/gnu/parallel/
|
available for download at: http://ftp.gnu.org/gnu/parallel/
|
||||||
|
|
||||||
Very few changes so this can be considered a stable release.
|
Very few changes so this can be considered a stable release.
|
||||||
|
|
|
@ -39,6 +39,12 @@ if(not $ENV{SHELL}) {
|
||||||
::warning("\$SHELL not set. Using /bin/sh.\n");
|
::warning("\$SHELL not set. Using /bin/sh.\n");
|
||||||
$ENV{SHELL} = "/bin/sh";
|
$ENV{SHELL} = "/bin/sh";
|
||||||
}
|
}
|
||||||
|
if(not $ENV{HOME}) {
|
||||||
|
# $ENV{HOME} is sometimes not set if called from PHP
|
||||||
|
::warning("\$HOME not set. Using /tmp\n");
|
||||||
|
$ENV{HOME} = "/tmp";
|
||||||
|
}
|
||||||
|
|
||||||
save_sig_stdin_stdout_stderr();
|
save_sig_stdin_stdout_stderr();
|
||||||
|
|
||||||
parse_options();
|
parse_options();
|
||||||
|
|
|
@ -22,4 +22,9 @@ echo '### -l -n with pipe'
|
||||||
echo '### bug #39360: --joblog does not work with --pipe'
|
echo '### bug #39360: --joblog does not work with --pipe'
|
||||||
seq 100 | parallel --joblog - --pipe wc | tr '0-9' 'X'
|
seq 100 | parallel --joblog - --pipe wc | tr '0-9' 'X'
|
||||||
|
|
||||||
|
echo '### How do we deal with missing $HOME'
|
||||||
|
unset HOME; stdout perl -w $(which parallel) echo ::: 1 2 3
|
||||||
|
|
||||||
|
echo '### How do we deal with missing $SHELL'
|
||||||
|
unset SHELL; stdout perl -w $(which parallel) echo ::: 1 2 3
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -93,3 +93,17 @@ echo '### bug #39360: --joblog does not work with --pipe'
|
||||||
Seq Host Starttime Runtime Send Receive Exitval Signal Command
|
Seq Host Starttime Runtime Send Receive Exitval Signal Command
|
||||||
X : XXXXXXXXXX.XXX X.XXX X X X X wc
|
X : XXXXXXXXXX.XXX X.XXX X X X X wc
|
||||||
XXX XXX XXX
|
XXX XXX XXX
|
||||||
|
echo '### How do we deal with missing $HOME'
|
||||||
|
### How do we deal with missing $HOME
|
||||||
|
unset HOME; stdout perl -w $(which parallel) echo ::: 1 2 3
|
||||||
|
parallel: Warning: $HOME not set. Using /tmp
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
echo '### How do we deal with missing $SHELL'
|
||||||
|
### How do we deal with missing $SHELL
|
||||||
|
unset SHELL; stdout perl -w $(which parallel) echo ::: 1 2 3
|
||||||
|
parallel: Warning: $SHELL not set. Using /bin/sh.
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
|
Loading…
Reference in a new issue