1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-22 19:19:46 +01:00

lib: add firstWord

This commit is contained in:
tv 2020-06-08 22:58:11 +02:00
parent 67132ed53f
commit 81c4885124

View file

@ -36,6 +36,9 @@ let {
if lib.length y != 1 then throw "malformed /etc/hostname" else
lib.elemAt y 0;
firstWord = s:
lib.head (lib.match "^([^[:space:]]*).*" s);
isLocalTarget = let
origin = lib.mkTarget "";
in target: