保誠-保戶業務員媒合平台
劉鈞霖
2021-12-15 8920cf32b364d6018da3a866e24e8d39e3b86087
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
 
basedir=`dirname "$0"`
 
if [ -f "$basedir/mvnw" ]; then
  builddir="target/node"
  installCommand="$basedir/mvnw frontend:install-node-and-npm@install-node-and-npm"
else
  builddir=".gradle/npm"
  installCommand="$basedir/gradlew npmSetup"
fi
 
NPM_EXE="$basedir/$builddir/npm"
 
if ! [ -x "$NPM_EXE" ]; then
  $installCommand || true
fi
 
if ! [ -x "$NPM_EXE" ]; then
  echo "Using npm installed globally"
  npm "$@"
else
  echo "Using npm installed locally $($NPM_EXE --version)"
  $NPM_EXE "$@"
fi