Guest User

Untitled

a guest
Mar 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. export PERL_USE_UNSAFE_INC=1
  4.  
  5. # Pull cpm from github. There will now be a fatpacked binary in cpm/cpm.
  6. git submodule update --init
  7.  
  8. perl cpm/cpm install -L local --target-perl 5.14.0 --with-develop --without-test || exit 1
  9.  
  10. export PERL5LIB=$PWD/lib:$PWD/local/lib/perl5
  11. export PATH=$PWD/local/bin:$PATH
  12.  
  13. export PERL_JSON_BACKEND=JSON::PP
  14. export B_HOOKS_ENDOFSCOPE_IMPLEMENTATION=PP
  15. export PACKAGE_STASH_IMPLEMENTATION=PP
  16. export PARAMS_VALIDATE_IMPLEMENTATION=PP
  17. export LIST_MOREUTILS_PP=1
  18. export MOO_XS_DISABLE=1
  19.  
  20. perl -c trailbreaker.pl || exit 1
  21.  
  22. trap 'rm -rf .build fatlib fatpacker.trace fatpacker.trace.bak packlists' EXIT
  23. fatpack trace trailbreaker.pl || exit 1
  24. fatpack packlists-for $(cat fatpacker.trace) > packlists || exit 1
  25. fatpack tree $(cat packlists) || exit 1
  26. # Copy in the app libs
  27. cp -r lib/* fatlib
  28. # Sometimes arch stuff ends up in the trace despite our best efforts, but if we
  29. # did our job right then the modules will work even without it (and might break
  30. # on a different arch with it). So nuke it all.
  31. rm -rf fatlib/$(perl -MConfig -e 'print $Config{archname}')
  32. # Delete stuff that takes up space and makes perlstrip whine
  33. find fatlib -name \*.pod -delete
  34. find fatlib -name \*.pl -delete
  35. find fatlib -type f -exec perlstrip {} +
  36. fatpack file trailbreaker.pl > trailbreaker
  37. # Add the config file
  38. echo '__DATA__' >> trailbreaker
  39. cat default_config.yaml >> trailbreaker
  40. chmod +x trailbreaker
Add Comment
Please, Sign In to add comment