#!/bin/sh script="$1" if test -z "$script"; then echo "No script set" exit 1 fi run="$(jq -r ".scripts[\"${script}\"]" < package.json)" echo "> $run" PATH="./node_modules/.bin:$PATH" sh -c "$run"