Skip to content

Commit

Permalink
Fix bin/run and bin/prove to use puppet'ed wrapper
Browse files Browse the repository at this point in the history
since bin/carton is gone now.
  • Loading branch information
rwstauner committed Sep 16, 2014
1 parent 211234f commit ede3eb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion bin/prove
@@ -1,3 +1,3 @@
#!/bin/sh

`dirname "$0"`/carton exec prove -lrv "$@"
`dirname "$0"`/run prove -lrv "$@"
23 changes: 3 additions & 20 deletions bin/run
@@ -1,22 +1,5 @@
#!/bin/sh

# NOTE: This script is used by puppet/cron jobs.

# 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.
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 "$@"
# Use the puppet-installed wrapper to set up the env properly.
wrapper=$HOME/bin/metacpan-web-carton
exec $wrapper exec "$@"

0 comments on commit ede3eb6

Please sign in to comment.