UNPKG

597 Bapplication/x-shView Raw
1#!/bin/bash
2
3NF="node ../nf.js"
4SED=`which gsed || which sed`
5
6rm -rf sandbox
7mkdir -p sandbox
8
9PATH=$(dirname $(which node)) $NF export \
10 --app upstart-test --user test-user \
11 --out sandbox --type upstart \
12 --cwd '/EXPORT/PATH' \
13 --env fixtures/env.env --procfile fixtures/Procfile
14
15$SED -i -e "s%$(pwd)%TEST_DIR%g" \
16 -e "s%$(dirname $(which node))%TEST_PATH%g" sandbox/*
17
18# Fixtures can be updated to match output by running `npm test --update-fixtures`
19test -n "$npm_config_update_fixtures" && cp sandbox/* fixtures/upstart/
20
21diff -r -u fixtures/upstart sandbox 1>&2 || exit $?