From 6e4f95d208c2ee0b31a2337cf30e389dd01fd3e6 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Thu, 25 May 2023 06:24:32 +0200 Subject: [PATCH] make install script respond better when CTRL+C'd --- install-helix.spl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-helix.spl b/install-helix.spl index 92b1835..fa977c7 100644 --- a/install-helix.spl +++ b/install-helix.spl @@ -1,8 +1,6 @@ "install-helix" =program-name func main { mega | pop - [ "sh" "-c" "mkdir -p $HOME/.config/helix/runtime/queries/spl && cp queries/* $HOME/.config/helix/runtime/queries/spl/" ] command-wait; - [ "sh" "-c" "rm -rf $HOME/.config/helix/runtime/grammars/sources/spl" ] command-wait; "Do you want to add the language to helix and reload? (Is this your first time running this script?) (yes/no)\n> " print readln "yes" eq if { @@ -12,6 +10,8 @@ func main { mega | pop "What is your helix binary? (hx/helix/...)\n> " print def hx readln =hx hx "" eq if { "hx" =hx } + [ "sh" "-c" "mkdir -p $HOME/.config/helix/runtime/queries/spl && cp queries/* $HOME/.config/helix/runtime/queries/spl/" ] command-wait; + [ "sh" "-c" "rm -rf $HOME/.config/helix/runtime/grammars/sources/spl" ] command-wait; [ hx "-g" "fetch" ] command-wait; [ hx "-g" "build" ] command-wait;