forked from mirrors/nixpkgs
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
|
From 81cf57e4653360af7f1718391e424fa05d8ea000 Mon Sep 17 00:00:00 2001
|
||
|
From: Keshav Kini <keshav.kini@gmail.com>
|
||
|
Date: Thu, 9 Aug 2018 18:36:15 -0700
|
||
|
Subject: [PATCH] Use `rm` from PATH
|
||
|
|
||
|
On NixOS (a Linux distribution), there is no `/bin/rm`, but an `rm`
|
||
|
command will generally be available in one's path when running shell
|
||
|
scripts. Here, I change a couple of invocations of `/bin/rm` into
|
||
|
invocations of `rm` to deal with this issue.
|
||
|
|
||
|
Since `rm` is already called elsewhere in the script without an
|
||
|
absolute path, I assume this change will not cause any
|
||
|
regressions. Still, I've tested this on a CentOS machine and a NixOS
|
||
|
machine, though not other platforms.
|
||
|
---
|
||
|
makeself-header.sh | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/makeself-header.sh b/makeself-header.sh
|
||
|
index 4d2c005..2babf34 100755
|
||
|
--- a/makeself-header.sh
|
||
|
+++ b/makeself-header.sh
|
||
|
@@ -515,7 +515,7 @@ if test x"\$quiet" = xn; then
|
||
|
fi
|
||
|
res=3
|
||
|
if test x"\$keep" = xn; then
|
||
|
- trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; /bin/rm -rf "\$tmpdir"; eval \$finish; exit 15' 1 2 3 15
|
||
|
+ trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; rm -rf "\$tmpdir"; eval \$finish; exit 15' 1 2 3 15
|
||
|
fi
|
||
|
|
||
|
if test x"\$nodiskspace" = xn; then
|
||
|
@@ -581,7 +581,7 @@ if test x"\$script" != x; then
|
||
|
fi
|
||
|
if test x"\$keep" = xn; then
|
||
|
cd "\$TMPROOT"
|
||
|
- /bin/rm -rf "\$tmpdir"
|
||
|
+ rm -rf "\$tmpdir"
|
||
|
fi
|
||
|
eval \$finish; exit \$res
|
||
|
EOF
|
||
|
--
|
||
|
2.14.1
|
||
|
|