gitmorph 0.2.2 → 0.2.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/bin/gm +10 -1
  2. package/package.json +1 -1
package/bin/gm CHANGED
@@ -1,7 +1,16 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
- BINARY_PATH="$(dirname "$0")/gm-binary"
4
+ # Resolve symlinks to find the actual package bin directory
5
+ SCRIPT="$0"
6
+ while [ -L "$SCRIPT" ]; do
7
+ DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
8
+ SCRIPT="$(readlink "$SCRIPT")"
9
+ case "$SCRIPT" in /*) ;; *) SCRIPT="$DIR/$SCRIPT" ;; esac
10
+ done
11
+ BIN_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
12
+
13
+ BINARY_PATH="$BIN_DIR/gm-binary"
5
14
 
6
15
  if [ ! -f "$BINARY_PATH" ]; then
7
16
  echo "Error: gm binary not installed. Try reinstalling:" >&2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmorph",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "GitMorph CLI — work with gitmorph.com from the command line",
5
5
  "bin": {
6
6
  "gm": "bin/gm"