1 |
> DEPEND="sys-apps/gawk" |
2 |
|
3 |
gawk is in the system set. If you really want to DEP on it explicitly, |
4 |
maybe we should create a virtual, as any POSIX-compliant awk will |
5 |
handle this. |
6 |
|
7 |
> # Temporary workaround for unset units. |
8 |
> # Backcompat. |
9 |
> [[ "${unit//*([[:digit:]])}" ]] || unit="M" |
10 |
> |
11 |
> case ${unit} in |
12 |
> G) echo "Gibibytes" ;; |
13 |
> M) echo "Mebibytes" ;; |
14 |
> T) echo "Tebibytes" ;; |
15 |
> *) |
16 |
> die "${FUNCNAME}: Unknown unit: ${unit}" |
17 |
> ;; |
18 |
> esac |
19 |
> } |
20 |
|
21 |
case ${unit} in |
22 |
[M0-9]) echo "mebibytes" ;; |
23 |
... |
24 |
|
25 |
And yes, they actually shall be written lowercase [1]. |
26 |
|
27 |
[1]:http://www.bipm.org/en/si/si_brochure/chapter5/5-2.html |
28 |
|
29 |
-- |
30 |
Best regards, |
31 |
Michał Górny |