UNPKG

323 Bapplication/x-shView Raw
1#!/bin/sh
2
3DIRNAME="$(dirname "$0")"
4POSTINSTALL_SCRIPT="$DIRNAME/postinstall.mjs"
5
6# NPM_MAJOR_VERSION=$(npm -v | cut -d '.' -f 1)
7NPM_MAJOR_VERSION=$(npm -v | awk -F . '{print $1}')
8
9if [ "$NPM_MAJOR_VERSION" -gt 6 ]; then
10 npm x -y -- zx@latest "$POSTINSTALL_SCRIPT"
11else
12 npx -y -- zx@latest "$POSTINSTALL_SCRIPT"
13fi