#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
basedir_win="$basedir"
exe=""
msys=""

case `uname -a` in
  *CYGWIN*|*MINGW*|*MSYS*)
    if command -v cygpath > /dev/null 2>&1; then
      basedir_win=`cygpath -w "$basedir"`
    fi
    exe=".exe"
    msys="true"
  ;;
  *WSL2*)
    if command -v wslpath > /dev/null 2>&1; then
      basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
      if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
        basedir_win="$basedir"
      else
        exe=".exe"
      fi
    fi
  ;;
esac

if [ -z "$NODE_PATH" ]; then
  export NODE_PATH="/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/vite@7.1.5_@types+node@24.4.0_jiti@1.21.7_yaml@2.8.1/node_modules/vite/node_modules:/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/vite@7.1.5_@types+node@24.4.0_jiti@1.21.7_yaml@2.8.1/node_modules:/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/node_modules"
else
  export NODE_PATH="/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/vite@7.1.5_@types+node@24.4.0_jiti@1.21.7_yaml@2.8.1/node_modules/vite/node_modules:/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/vite@7.1.5_@types+node@24.4.0_jiti@1.21.7_yaml@2.8.1/node_modules:/var/www/download/bms-front-tavakoli-react/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
  exec "$basedir/node.exe"  "$basedir_win/../vite/bin/vite.js" "$@"
elif [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/../vite/bin/vite.js" "$@"
elif command -v node >/dev/null 2>&1; then
  exec node  "$basedir/../vite/bin/vite.js" "$@"
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
  exec node.exe  "$basedir_win/../vite/bin/vite.js" "$@"
else
  exec node  "$basedir/../vite/bin/vite.js" "$@"
fi
# cmd-shim-target=/var/www/download/bms-front-tavakoli-react/node_modules/vite/bin/vite.js
