about summary refs log tree commit diff stats
path: root/bootstrap
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-19 23:14:54 +0100
committerene <ene@sils.li>2023-02-19 23:31:01 +0100
commit02a090a604b6a36b248629b686994dd0eb8b5e98 (patch)
treefa4921f306ff3558ec5424fc1d64208424cef0dc /bootstrap
parentFix(river): Record the deps for the init script (diff)
downloadnixos-config-02a090a604b6a36b248629b686994dd0eb8b5e98.tar.gz
nixos-config-02a090a604b6a36b248629b686994dd0eb8b5e98.zip
Fix(bootstrap): Remove useless awk call
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/install4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap/install b/bootstrap/install
index 7ec982bc..3cdf578e 100755
--- a/bootstrap/install
+++ b/bootstrap/install
@@ -101,7 +101,7 @@ case $result in
         host="";
         awk -F "." '/nixosConfiguration/{print $2}' "$(tmp 'curl https://git.sils.li/ene/nixos-config/raw/branch/prime/flake.nix')" | awk '{print $1}' > $hosts;
 
-        while ! awk -v host $host '{$0 ~ host}' "$hosts" && [ "$host" != "" ]; do
+        while ! grep "$host" "$hosts" > /dev/null && [ "$host" == "" ]; do
             i=1;
             while read -r ho ; do
                 printf "%4s) %s \n" "$i" "$ho";
@@ -111,7 +111,7 @@ case $result in
             readp  "Enter a option: " host
 
             [ $host = "q" ] && exit 1
-            if awk -v host $host '{$0 ~ host}' "$hosts" && [ "$host" != "" ]; then
+            if grep "$host" "$hosts" > /dev/null && [ "$host" != "" ]; then
                 host=$(awk -v i="$host" '{if (NR==i) {print $0}}' "$hosts");
             else
                 warning "No host selected. Select a host to continue.\n"