From c56ad3bd179d765d0f24665ad3e5dc52464e70e9 Mon Sep 17 00:00:00 2001 From: Matthew Wonlaw Date: Wed, 30 Oct 2024 05:30:33 -0400 Subject: [PATCH] script to run on win or sh --- package.json | 4 ++-- shell.ps1 | 18 ++++++++++++++++++ shell.sh | 1 - 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 shell.ps1 delete mode 100755 shell.sh diff --git a/package.json b/package.json index eab0366a..b8815ca2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rocicorp/zero-sqlite3", - "version": "1.0.2", + "version": "1.0.3", "description": "better-sqlite3 on bedrock", "homepage": "https://github.com/rocicorp/zero-sqlite3", "author": "Rocicorp", @@ -10,7 +10,7 @@ }, "main": "lib/index.js", "bin": { - "zero-sqlite3": "./shell.sh" + "zero-sqlite3": "./shell.ps1" }, "files": [ "binding.gyp", diff --git a/shell.ps1 b/shell.ps1 new file mode 100755 index 00000000..29530194 --- /dev/null +++ b/shell.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env sh +echo --% >/dev/null;: ' | out-null +<#' + + +# +# sh part +# +"$(dirname "$0")/build/Release/zero_sqlite3" +# end bash part + +exit #> + + +# +# powershell part +# +& "$PSScriptRoot\build\Release\zero_sqlite3.exe" diff --git a/shell.sh b/shell.sh deleted file mode 100755 index 85071fa5..00000000 --- a/shell.sh +++ /dev/null @@ -1 +0,0 @@ -./build/Release/zero_sqlite3 \ No newline at end of file