mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-12 14:13:36 +00:00
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
diff --git a/sem b/sem
|
|
index 873f294..4fa24cb 100644
|
|
--- a/src/sem
|
|
+++ b/src/sem
|
|
@@ -2335,10 +2335,10 @@
|
|
## Shell
|
|
#
|
|
if($opt::fast) {
|
|
- $Global::shell = $ENV{'PARALLEL_SHELL'} || which("dash") || "/bin/sh";
|
|
+ $Global::shell = $ENV{'PARALLEL_SHELL'} || which("dash") || "@TERMUX_PREFIX@/bin/sh";
|
|
} else {
|
|
$Global::shell = $ENV{'PARALLEL_SHELL'} || parent_shell($$)
|
|
- || $ENV{'SHELL'} || "/bin/sh";
|
|
+ || $ENV{'SHELL'} || "@TERMUX_PREFIX@/bin/sh";
|
|
}
|
|
if(not -x $Global::shell and not which($Global::shell)) {
|
|
::error("Shell '$Global::shell' not found.");
|
|
@@ -3009,14 +3009,14 @@
|
|
$Global::trim = 'n';
|
|
$Global::max_jobs_running = 0;
|
|
$Global::job_already_run = '';
|
|
- $ENV{'TMPDIR'} ||= "/tmp";
|
|
- $ENV{'PARALLEL_REMOTE_TMPDIR'} ||= "/tmp";
|
|
+ $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp";
|
|
+ $ENV{'PARALLEL_REMOTE_TMPDIR'} ||= "@TERMUX_PREFIX@/tmp";
|
|
# bug #55398: set $OLDPWD when using --wd
|
|
$ENV{'OLDPWD'} = $ENV{'PWD'};
|
|
if(not $ENV{HOME}) {
|
|
# $ENV{HOME} is sometimes not set if called from PHP
|
|
- ::warning("\$HOME not set. Using /tmp.");
|
|
- $ENV{HOME} = "/tmp";
|
|
+ ::warning("\$HOME not set. Using @TERMUX_PREFIX@/tmp.");
|
|
+ $ENV{HOME} = "@TERMUX_PREFIX@/tmp";
|
|
}
|
|
# no warnings to allow for undefined $XDG_*
|
|
no warnings 'uninitialized';
|
|
@@ -5152,7 +5152,7 @@
|
|
unlink $stderrname;
|
|
|
|
my $pid = ::open3($stdin_fh,$stdout_fh,$stderr_fh,
|
|
- $0,qw(--plain --shell /bin/sh --will-cite), @args);
|
|
+ $0,qw(--plain --shell @TERMUX_PREFIX@/bin/sh --will-cite), @args);
|
|
if(my $writerpid = fork()) {
|
|
close $stdin_fh;
|
|
@stdout = <$stdout_fh>;
|