From af41dc7c5eab9372358c117ed7fec46a6074e854 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 5 Oct 2024 10:41:18 +0700 Subject: [PATCH] Add build.sh --- build.sh | 16 ++++++++++++++++ build.ts | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..db34dc6 --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +build_all () { + # Clear screen + printf "\033c" + + # Build all variants + bun build.ts --version $1 --variant full + bun build.ts --version $1 --variant lite + + # Wait for key + read -p ">> Press Enter to build again..." + build_all $1 +} + +build_all $1 diff --git a/build.ts b/build.ts index 50043b0..963639d 100644 --- a/build.ts +++ b/build.ts @@ -200,7 +200,8 @@ async function main() { await build(target, values['version']!!, values['variant'], config); } - console.log('\n** Press Enter to build or Esc to exit'); + console.log('') + // console.log('\n** Press Enter to build or Esc to exit'); } function onKeyPress(data: any) { @@ -213,6 +214,9 @@ function onKeyPress(data: any) { } main(); + +/* process.stdin.setRawMode(true); process.stdin.resume(); process.stdin.on('data', onKeyPress); +*/