1 |
commit: e757ab1145cc4c6ce7b2c2005220ae59792e218e |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 23 12:40:28 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 23 12:40:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e757ab11 |
7 |
|
8 |
rc.eselect: Test for regular file. |
9 |
|
10 |
* modules/rc.eselect (is_script): Test whether the script is a |
11 |
regular file, bug 718920. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/718920 |
14 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
15 |
|
16 |
ChangeLog | 5 +++++ |
17 |
modules/rc.eselect | 1 + |
18 |
2 files changed, 6 insertions(+) |
19 |
|
20 |
diff --git a/ChangeLog b/ChangeLog |
21 |
index 86ffd88..d037d6a 100644 |
22 |
--- a/ChangeLog |
23 |
+++ b/ChangeLog |
24 |
@@ -1,3 +1,8 @@ |
25 |
+2020-04-23 Ulrich Müller <ulm@g.o> |
26 |
+ |
27 |
+ * modules/rc.eselect (is_script): Test whether the script is a |
28 |
+ regular file, bug 718920. |
29 |
+ |
30 |
2019-11-28 Ulrich Müller <ulm@g.o> |
31 |
|
32 |
* configure.ac: Update version to 1.4.16. |
33 |
|
34 |
diff --git a/modules/rc.eselect b/modules/rc.eselect |
35 |
index 4a3c16d..a606cfa 100644 |
36 |
--- a/modules/rc.eselect |
37 |
+++ b/modules/rc.eselect |
38 |
@@ -35,6 +35,7 @@ is_script() { |
39 |
[[ -n ${file} \ |
40 |
&& ${file%%.sh} = "${file}" \ |
41 |
&& ${file%%\~} = "${file}" \ |
42 |
+ && -f ${file} \ |
43 |
&& -x ${file} ]] \ |
44 |
&& read line <"${file}" \ |
45 |
&& [[ ${line} =~ ^#!.*(runscript|openrc-run) ]] |