1 |
First, this seems fishy: |
2 |
"$(python -V 2>&1 | sed -e 's/Python //' -e 's/\.[^\.]*$//')" |
3 |
'[^\.]' and '[^.\]' means the same: anything except dots and backslashes. |
4 |
'[^.]' seems more reasonable. |
5 |
|
6 |
Second, as this is an argument to sudo, I would prefer the more secure: |
7 |
"$(python -V 2>&1 | grep -o '[1-9][0-9]*\.[0-9]*')" |
8 |
which only let numbers, dots and spaces pass its filter (assuming that python |
9 |
-V may contain garbage). |
10 |
|
11 |
Xdej |
12 |
|
13 |
2014-07-06 22:25 UTC+02:00, Manuel Rüger <mrueg@g.o>: |
14 |
> Updated patch, I forgot to remove debug statement. |
15 |
> |
16 |
> Manuel |
17 |
> |
18 |
> On 07/06/2014 10:17 PM, Manuel Rüger wrote: |
19 |
>> This patch adds support for travis continuous integration. |
20 |
>> |
21 |
>> Example output: https://travis-ci.org/mrueg/portage/builds/29268364 |
22 |
>> |
23 |
>> Cheers |
24 |
>> |
25 |
>> Manuel |
26 |
>> |
27 |
> |