1 | #!/bin/bash
|
2 |
|
3 | NF="node ../nf.js"
|
4 | SED=`which gsed || which sed`
|
5 |
|
6 | rm -rf sandbox
|
7 | mkdir -p sandbox
|
8 |
|
9 | echo "PATH=something-totally-bogus" > sandbox/.env
|
10 | printf "#norun: touch should-not-exist.js\nrun: touch should-exist.js\n# norun: touch should-not-exist-2.js\n" > sandbox/Procfile
|
11 |
|
12 | node ../nf.js export --out sandbox --env sandbox/.env --type upstart-single --procfile sandbox/Procfile
|
13 |
|
14 | $SED -i -e "s%$(pwd)%TEST_DIR%g" \
|
15 | -e "s%$(dirname $(which node))%TEST_PATH%g" sandbox/*
|
16 |
|
17 |
|
18 | test -n "$npm_config_update_fixtures" && cp sandbox/* fixtures/procfile-comment/
|
19 |
|
20 | diff -r -u fixtures/procfile-comment sandbox 1>&2 || exit $?
|