1 |
commit: be71bd07a5df16be4dba219376d4fedcda876cbe |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 19:34:18 2011 +0000 |
4 |
Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 19:34:18 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=be71bd07 |
7 |
|
8 |
Bit harder to trick get_slots(). |
9 |
|
10 |
--- |
11 |
postgresql.eselect | 4 +++- |
12 |
1 files changed, 3 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/postgresql.eselect b/postgresql.eselect |
15 |
index 211dbc5..7b7501b 100644 |
16 |
--- a/postgresql.eselect |
17 |
+++ b/postgresql.eselect |
18 |
@@ -81,7 +81,9 @@ unlinker() { |
19 |
### Get Slots Function ### |
20 |
# Find all available slots in the preferred lib_dir() and return them. |
21 |
get_slots() { |
22 |
- echo $(ls -dv ${B_PATH}/$(lib_dir)/postgresql-* 2> /dev/null | sed -re 's#^.+-##') |
23 |
+ echo $(find "${B_PATH}/$(lib_dir)" -maxdepth 1 -type d \ |
24 |
+ -regex '.*postgresql-[0-9]+\.[0-9]+' -printf '%f\n' | \ |
25 |
+ sed -re 's#^.+-##' | sort -n) |
26 |
} |
27 |
|
28 |
### List Action ### |