@flowscripter/template-bun-executable 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/script/install.sh +17 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/template-bun-executable",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Project template for a cross-platform Bun executable with ffi native library and Bun library dependencies",
5
5
  "keywords": [
6
6
  "bun",
package/script/install.sh CHANGED
@@ -1,25 +1,34 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e # Exit on error
3
+ set -e
4
4
 
5
- # Define the download URL
6
- URL="https://github.com/flowscripter/template-bun-executable/releases/latest/download/template-bun-executable_Linux_x86_64.zip"
5
+ ARCH=$(uname -m)
6
+ case "$ARCH" in
7
+ x86_64)
8
+ ARCH_SUFFIX="x64"
9
+ ;;
10
+ aarch64|arm64)
11
+ ARCH_SUFFIX="arm64"
12
+ ;;
13
+ *)
14
+ echo "Unsupported architecture: $ARCH"
15
+ exit 1
16
+ ;;
17
+ esac
18
+
19
+ URL="https://github.com/flowscripter/template-bun-executable/releases/latest/download/template-bun-executable_Linux_${ARCH_SUFFIX}.zip"
7
20
 
8
- # Create a temporary directory
9
21
  TMP_DIR=$(mktemp -d)
10
22
  cd "$TMP_DIR"
11
23
 
12
- # Download and extract
13
24
  echo "Downloading template-bun-executable..."
14
25
  curl -fsSL "$URL" -o executable.zip
15
26
  unzip executable.zip
16
27
 
17
- # Install
18
28
  chmod +x template-bun-executable
19
29
  sudo mv template-bun-executable /usr/local/bin/
20
30
 
21
- # Clean up
22
31
  cd -
23
32
  rm -rf "$TMP_DIR"
24
33
 
25
- echo "Installation complete! Run 'template-bun-executable' to get started."
34
+ echo "Installation complete! Run 'template-bun-executable' to get started."