mirror of https://cgit.krebsco.de/krops
lib: add firstWord
This commit is contained in:
parent
67132ed53f
commit
81c4885124
|
@ -36,6 +36,9 @@ let {
|
||||||
if lib.length y != 1 then throw "malformed /etc/hostname" else
|
if lib.length y != 1 then throw "malformed /etc/hostname" else
|
||||||
lib.elemAt y 0;
|
lib.elemAt y 0;
|
||||||
|
|
||||||
|
firstWord = s:
|
||||||
|
lib.head (lib.match "^([^[:space:]]*).*" s);
|
||||||
|
|
||||||
isLocalTarget = let
|
isLocalTarget = let
|
||||||
origin = lib.mkTarget "";
|
origin = lib.mkTarget "";
|
||||||
in target:
|
in target:
|
||||||
|
|
Loading…
Reference in New Issue