Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bin wrappers to use puppet and fallback to carton
- Loading branch information
Showing
2 changed files
with
7 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
`dirname "$0"`/carton exec -- prove -lv "$@" | ||
`dirname "$0"`/run prove -lv "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# NOTE: This script is used by puppet/cron jobs. | ||
# Use the puppet-installed wrapper to set up the env properly. | ||
wrapper=$HOME/bin/metacpan-api-carton | ||
test -x $wrapper && \ | ||
exec $wrapper exec -- "$@" | ||
|
||
# This wrapper script sets up the environment to run other local (repo) scripts. | ||
# We need to use ./bin/carton to get the custom PERL_CARTON_PATH env var | ||
# (where modules are installed). | ||
# We also either need to chdir so that cpanfile is in $PWD | ||
# or we need to determine the full path and set an env var. | ||
# Changing to this dir is convenient for making shorter command lines, | ||
# so we'll do that. | ||
|
||
# Change to the parent dir of this script | ||
# whether called with full, relative, or no path. | ||
# If the wrapper doesn't exist, just try it with plain carton. | ||
cd "`dirname "$0"`"/.. | ||
|
||
# Load perl env if necessary. | ||
rc=/home/metacpan/.metacpanrc | ||
test -r "$rc" && source "$rc" | ||
|
||
# Run through carton exec (which expects ./cpanfile) to get the custom lib path. | ||
exec bin/carton exec "$@" | ||
exec carton exec -- "$@" |