From 344085ed10b3f03e0ef0f6833be50a5ef1f68488 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Tue, 12 Aug 2025 18:46:10 -0300 Subject: [PATCH] :package: build(scripts): make `start` script to only do it's supposed work, add `clean` script --- scripts/clean.sh | 6 ++++++ scripts/start.sh | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 scripts/clean.sh diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100644 index 0000000..aee88eb --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,6 @@ +set -e + +builddir="${1:-./build}" + +echo "[info] cleaning build dir: \"$builddir\"" +rm -r "$builddir" diff --git a/scripts/start.sh b/scripts/start.sh index a2df4c0..4e0366f 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -20,9 +20,10 @@ function start() { exec "$file" } -if [[ -f "$file" ]]; then +if [[ -f $file ]]; then start else - pnpm build - start + echo "[error] can't start project: no executable found on default directory" + echo "[tip] specify the executable path: start \"\$path\"" + exit 1 fi