@ssebastien/tcmd 0.1.0 → 0.1.1

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/bin/tcmd +12 -2
  2. package/package.json +1 -1
package/bin/tcmd CHANGED
@@ -1,7 +1,17 @@
1
1
  #!/bin/sh
2
2
  # TinyCommand `tcmd` entry point.
3
3
  if ! command -v bun >/dev/null 2>&1; then
4
- printf '%s\n' 'tcmd requires Bun (https://bun.sh). Install Bun, then run `npm x tcmd` again.' >&2
4
+ printf '%s\n' 'tcmd requires Bun (https://bun.sh). Install Bun, then run `bun x @ssebastien/tcmd` again.' >&2
5
5
  exit 1
6
6
  fi
7
- exec bun "$(dirname "$0")/../src/js/tcmd/tui/index.js" "$@"
7
+ script=$0
8
+ while [ -L "$script" ]; do
9
+ dir=$(CDPATH= cd -- "$(dirname -- "$script")" && pwd)
10
+ link=$(readlink "$script")
11
+ case "$link" in
12
+ /*) script=$link ;;
13
+ *) script=$dir/$link ;;
14
+ esac
15
+ done
16
+ dir=$(CDPATH= cd -- "$(dirname -- "$script")" && pwd)
17
+ exec bun "$dir/../src/js/tcmd/tui/index.js" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssebastien/tcmd",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TinyCommand: a midnight-commander-like CLI and desktop tool",
5
5
  "type": "module",
6
6
  "main": "./src/js/tcmd/index.js",