1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
# Create a clean local lib
!!!perlbrew use perl-5.16.3
!!!perlbrew lib delete perl-5.16.3@demo
!!!perlbrew lib create perl-5.16.3@demo
!!!exit
# Trick cpanm into installing Pinto and a few prereqs
!!!rm -rf ~/opt/local/pinto/lib/perl5/HTTP*
!!!rm -rf ~/opt/local/pinto/lib/perl5/Pinto*
!!!rm -rf ~/opt/local/pinto/lib/perl5/darwin-2level/auto/Pinto
# Delete the Pinto repo
!!!rm -rf MyModules
# Final environment setup
!!!perlbrew use perl-5.16.3@demo
!!!export PERL_CPANM_OPT=--notest
# Live portion starts here
echo 'Here we go!'; clear
# Install pinto
curl -L http://getpinto.stratopan.com | bash
# Create repository
pinto %%%--root MyModules %%%init %%%--source file:///Users/jeff/tmp/CPAN-Today
# Show repository structure
find MyModules -type f
# Set ENV var, so we can be lazy
export PINTO_REPOSITORY_ROOT=$PWD/MyModules
# Pull Dancer from CPAN and install
pinto install%%% --do-pull%%% Dancer
# Show stack contents
pinto list
clear
# URI is broken so inject our patched one
pinto add%%% ~/tmp/URI-1.58_PATCHED.tar.gz
# Pin our URI so it doesn't change
pinto pin%%% URI
# Edit config file to travel forward in time
(exec < /dev/tty vim MyModules/.pinto/config/pinto.ini)
# Pull newer Dancer and install
pinto install --do-pull Dancer%%%~1.3116
# Show log to explain the pin
pinto log
# Make a copy of the stack
pinto copy%%% master foo
# Show the stack listing
pinto stacks
# Unpin URI on the copied stack
pinto unpin%%% --stack foo%%% URI
# Upgrade Dancer
pinto install --do-pull --stack foo%%% Dancer~1.3116
# Compare the stacks
pinto diff%%% master foo
# Unpin URI on master too
pinto unpin URI
# Pull Dancer to master
pinto pull Dancer~1.3116
# Compare stacks again
pinto diff master foo
# The end
echo 'Thank You!'
exit
|